MCPcopy Index your code
hub / github.com/formatjs/formatjs / icuUnitToEcma

Function icuUnitToEcma

packages/icu-skeleton-parser/number.ts:42–44  ·  view source on GitHub ↗
(unit: string)

Source from the content-addressed store, hash-verified

40}
41
42function icuUnitToEcma(unit: string): ExtendedNumberFormatOptions['unit'] {
43 return unit.replace(/^(.*?)-/, '') as ExtendedNumberFormatOptions['unit']
44}
45
46const FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g
47const SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g

Callers 1

parseNumberSkeletonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected