Parser and formatter for ICU NumberFormat skeleton strings and patterns. Version 0.2.1. Part of the Messageformat project under OpenJS Foundation. Parses ICU skeleton strings like 'compact-short currency/GBP' and number patterns, converting them into structured Skeleton objects, and provides formatters via getNumberFormatter() using Intl.NumberFormat internally. Differentiates from raw Intl.NumberFormat by accepting human-readable skeleton syntax and enabling pre-compilation for Messageformat and similar template engines. Low release cadence but stable API.
npm install messageformat-number-skeletonNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses an ICU number skeleton and uses it to format numbers with locale-specific Intl.NumberFormat.
Use import() or switch to an ESM environment.
Use polyfill for Intl.NumberFormat or target modern environments.
Use import type { Skeleton } from 'messageformat-number-skeleton'Pin version and test after upgrades.
Replace require() with dynamic import(): const m = await import('messageformat-number-skeleton');Use import type { Skeleton } from 'messageformat-number-skeleton'Install intl polyfill or upgrade runtime.