{"name":"messageformat","version":"4.0.0-3","description":"Intl.MessageFormat / Unicode MessageFormat 2 parser, runtime and polyfill","keywords":["messageformat","unicode","polyfill","internationalization","i18n","localization","l10n"],"contributors":[{"name":"Eemeli Aro","email":"eemeli@gmail.com"}],"license":"Apache-2.0","homepage":"http://messageformat.github.io/messageformat/","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git","directory":"packages/mf2-messageformat"},"main":"lib/index.js","scripts":{"build":"tsc --project tsconfig.build.json","extract-api":"api-extractor run --local --verbose"},"types":"./lib/index.d.ts","readme":"# A Polyfill for Intl.MessageFormat\n\nThis library provides a runtime for the [ECMA-402 Intl.MessageFormat proposal],\nwhich is built on top of the developing [Unicode MessageFormat 2.0 specification], \"MF2\".\n\n[ecma-402 intl.messageformat proposal]: https://github.com/dminor/proposal-intl-messageformat/\n[unicode messageformat 2.0 specification]: https://github.com/unicode-org/message-format-wg\n\n> **NOTE**: This means that the v4 release of the `messageformat` package has\n> an entirely different API compared to its earlier major releases,\n> which were built on top of ICU MessageFormat, aka \"MF1\".\n> For that,\n> please see [`@messageformat/core`](https://www.npmjs.com/package/@messageformat/core) instead.\n\n## Usage\n\n```sh\nnpm install --save-exact messageformat@next\n```\n\n```js\nimport { MessageFormat } from 'messageformat';\nIntl.MessageFormat = MessageFormat;\n```\n\nIn addition to supporting MF2 syntax,\ncompilers and formatting function runtimes are also provided for\nICU MessageFormat and Fluent messages:\n\n- [@messageformat/icu-messageformat-1](https://www.npmjs.com/package/@messageformat/icu-messageformat-1)\n- [@messageformat/fluent](https://www.npmjs.com/package/@messageformat/fluent)\n\n## API\n\nThe API provided by this Intl.MessageFormat polyfill is current as of\n[2022-07-13](https://github.com/tc39/proposal-intl-messageformat/blob/72eefa5/README.md).\nThe static `MessageFormat.parseResource()` method is not yet provided,\nas the message resource syntax is still under development.\n\n```js\nconst locale = 'en-US';\nconst msg = '{Today is {$today :datetime dateStyle=medium}}';\n\nconst mf = new Intl.MessageFormat(msg, locale);\n\nmf.resolveMessage({ today: new Date('2022-02-02') }).toString();\n// 'Today is Feb 2, 2022'\n```\n\nFor more information on additional types and functions provided by this package,\nsee the [API documentation site](https://messageformat.github.io/messageformat/api/).\n","readmeFilename":"README.md","gitHead":"80726266ddd44210f7238bae3c36e0fc3e560ecf","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat@4.0.0-3","_nodeVersion":"19.1.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-StzbHaBlTMlF5qhF8ldL2ajm+YsA+xi9uQJrqlbHCDnk80PZ+D7fgskb0VwBx/v8Zq7db2tL3dEdi/ZRp2v+5A==","shasum":"5c556d53ddde40343165e61403da87f3a07d9dec","tarball":"http://registry-npm.ywwl.com/messageformat/download/messageformat-4.0.0-3.tgz","fileCount":69,"unpackedSize":110510,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEU12lbDr8mkIVprJQlrPRPmQYbRNUeu0JakirwoGWDpAiAByTwm24t5DklMGjp5F90Vfs3NTYKn8pu2PIm7ejT43A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEG/OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFsA//SZpdSIn+HOoGuIiGqs4um3HiAxXk1QJrde56k8n/Ogs2kbWT\r\nZNUWFMMfxQ8rp4LixDoIdPCiSFylluYiPyyPvHktv+6lgyyHUvCZPFh6YS9F\r\nEm6/NNFgXE6yW9Y5CZHj0bni/TQd13sKrH6wPJ/ieDooEFUFfeuHH6Vb2wil\r\n6knpJeomTi58akIKY9Y1b52bYs6wRmKtBwiFam2bZEbR9FH6cSd5WhiebL0M\r\nOYMMLcSS+6S+e2mMpfAGB9uLPLoyq1hRf47SIRQv/noDi2phz/ambbY2M3vT\r\nHnNfMd0ose/xry/HZ5eTbhcHTh2akMkMzZ+i+BwWqyzopAukico80YH/uGaD\r\nB/uGoo0d82KU7eby9frgGXvnG6TeNeJcynCYW4NQfOUqbWuX7Vu8p34Nx4tc\r\neZcl3y1eOrVx/xJnSLOf+x21/NLd1FWEpyUNP98ot9Act3JsYylPHBQ4HB8b\r\n/L42WQif/gFCyo9pGkb78juyoNkuSW9IjC7AU7bfcd8e/32oRWcGLUGsU5XZ\r\nvKgLOaFE293Ha85WP1sVDQLAGZHrJIIVLRq+ZUVHDEFrJMbsqzkmoQyWJ72f\r\nO7KOIdN8ExGdJuVr2FIP0hiWWq8gYziQysO1Rn26LHiuVcsJSEnCu1sQIz1U\r\nAbMub4GyknwBwp0eXsWbA1wwnSbQWryrVVY=\r\n=bxet\r\n-----END PGP SIGNATURE-----\r\n","size":26270,"noattachment":false,"key":"/messageformat/-/messageformat-4.0.0-3.tgz"},"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"directories":{},"maintainers":[{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"eemeli","email":"eemeli@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat_4.0.0-3_1678798798383_0.6537004586343276"},"_hasShrinkwrap":false,"publish_time":1678798798567,"_cnpm_publish_time":1678798798567,"dist-tags":{"latest":"4.1.0"}}