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

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