[Go to site: main page, start]

Module messageformat/functions

Implementations for :number, :string, and other default functions, along with some utilities for building custom function handlers.

import { MessageFormat } from 'messageformat';
import { DraftFunctions } from 'messageformat/functions';

const mf = new MessageFormat(locale, msgSrc, { functions: DraftFunctions });

Formatting

MessageFunction

Other

MessageDateTime
MessageFallback
MessageFunctionContext
MessageNumber
MessageString
MessageValue
DefaultFunctions
DraftFunctions
asBoolean
asPositiveInteger
asString
getLocaleDir