{"name":"messageformat","version":"4.0.0-3.cf","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":"102121b0bb765f8d11ca4035331bf6ba6585c19d","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat@4.0.0-3.cf","_nodeVersion":"19.1.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-ELtgdXLstiA5mgC955dQrOTXBBuqEDfXd1O1tmM2rGtCz9fU1lvNRdINw4fv4dttjqvtufDZci8xhIvyxXUHAg==","shasum":"fccec1bababe64c12ec4ba7ed9f1edd511f7fda9","tarball":"http://registry-npm.ywwl.com/messageformat/download/messageformat-4.0.0-3.cf.tgz","fileCount":69,"unpackedSize":112013,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBevE8jf6AQW/1Utt3105ulwIEtXMDv+YCJddTOWkrvgAiEA3YMgygZbj1INhlniR4MvvQrK1EWb1Hw4XzcQd90kBcg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEHGHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7FBAAgSnxvglMGaXgmC+itnvh7erMoWr3aoIXtbVNcgvYU8CieMnW\r\nLnoajTNW2ja3ll04nPmUErx3BUv4tkLwn7FFrYRSHrZ3i3lmnbJVZYhIeKZ9\r\n/aPvpyeOXxkQ/TDJp5ed8nLUQzt5KVO3D0FFAaGPomnVvLwB6R6COIXoQhC/\r\nsxbufUyajcljWD65sFFNVj0oobzqaiS2gOyca60dEuunDEzojnwKIjnHA7gU\r\nqZfTYyqdpyOxaMCKWVEJ0P/Zvqauzbw0KJLBSPJBZEWkTKBSjqSsmTjXzywO\r\nltCuPgA2DGhRUDcKo6uBhWFS1kZp/F4rQxweo7wdycsX7GNlURbvXP83kEUH\r\nVl8C73ygwvPNdBEFV6j56CpuhBTmHtoXXzOph6rlNRDt1PqqW8TGp+b6KnSb\r\nHeDG5J4OsbbpkIdkkwbrf6fNhP/s9ua7i6E1JdFrPgmxG/u1nwfeQow+wzpq\r\nAlpd6MtlOT+D9sdTtGHuvXb7NGxGzDdi73/Wld+Uq3rnSixo0ttige2+B01n\r\nlPiAxgaXt386IBqR6uIDM0t09ZasDAtndfwf46xOieqYXRIXyBNM69gXhtcT\r\neTIilZJ/ADP4G3G2gu/MIiRs0aid81FFNqMsbL5g6HHK8uGv88uE1M2hq3f2\r\n508FGFV1TnXLIWL7VIvViaq1V1v/ZUZ74to=\r\n=Fxyt\r\n-----END PGP SIGNATURE-----\r\n","size":26643,"noattachment":false,"key":"/messageformat/-/messageformat-4.0.0-3.cf.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.cf_1678799239699_0.9334629735455218"},"_hasShrinkwrap":false,"publish_time":1678799239847,"_cnpm_publish_time":1678799239847,"dist-tags":{"latest":"4.1.0"}}