View as Markdown

API reference: @salmonui/core/format

FormatEnvironmentinterface

import type { FormatEnvironment } from '@salmonui/core/format';
interface FormatEnvironment {
    getLocale(): string;
    readonly timeZone: string | undefined;
    readonly currency: string;
    readonly cache: Map<string, Intl.NumberFormat | Intl.DateTimeFormat | Intl.Collator>;
    readonly warn: Warn;
}

Value formatting backed by the platform Intl API. Formatter instances are created once per (locale, options) pair and cached per engine.

FormatEnvironment members (5)
NameSignatureDescription
getLocalegetLocale(): string;
timeZonereadonly timeZone: string | undefined;
currencyreadonly currency: string;
cachereadonly cache: Map<string, Intl.NumberFormat | Intl.DateTimeFormat | Intl.Collator>;
warnreadonly warn: Warn;