package
Compile ICU MessageFormat 1 sources into MessageFormat 2 formatters
npm install @messageformat/icu-messageformat-1GitHub-flavored package documentation.
Across all versions, last 30 days.
27,082 in 30 days
Runtime metadata.
Tagged topics.
Estimated unpacked size across 6 packages.
389.1 kB
Includes dependencies.
4 direct dependencies.
^4.1.0
4.1.0
^5.2.0
5.2.0
2.0.0-0
1.1.0
1.2.0
This library provides compatibility for using ICU MessageFormat 1 sources with the Unicode MessageFormat 2.0 -based ECMA-402 Intl.MessageFormat proposal.
npm install @messageformat/icu-messageformat-1import { mf1ToMessage } from '@messageformat/icu-messageformat-1';
const locale = 'en-US';
const msg = 'Today is {today, date}';
const mf = mf1ToMessage(msg, locale);
mf.format({ today: new Date('2022-02-02') });
// 'Today is Feb 2, 2022'import {
MF1Functions,
mf1ToMessage,
mf1ToMessageData,
mf1Validate
} from '@messageformat/icu-messageformat-1';For more information, see the documentation site.