Skip to content

Function: register()

ts
function register(
  what: RegisterType,
  key: string,
  value: NumeralJSLocale | NumeralJSFormat,
): NumeralJSLocale | NumeralJSFormat;

Registers a language definition or a custom format definition.

Parameters

ParameterTypeDescription
whatRegisterTypeAllowed values are: either 'format' or 'locale'
keystringThe key of the registerd type, e.g. 'de' for a german locale definition
value| NumeralJSLocale | NumeralJSFormatThe locale definition or the format definitiion

Returns

| NumeralJSLocale | NumeralJSFormat