{"name":"messageformat","version":"4.0.0-1","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":"d42323c2e5764bc02e4a75ce839c8b4fc74d6b80","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat@4.0.0-1","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"integrity":"sha512-zIzZxOR3W7nUlZDt80h/J72LVRcaH/LKpXQ5JanNF21lC0wbCb8QgH/0QwDvQ0r46YoB/3b54eq8Q+Q4kJAU9A==","shasum":"7f3de9e35165e3b87929b855b635919c10048971","tarball":"http://registry-npm.ywwl.com/messageformat/download/messageformat-4.0.0-1.tgz","fileCount":68,"unpackedSize":112626,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3Fyc4OfEQthlvo37QloRr92pNnidsGmVKY97mybjxPAIhAJtzo94FH4kTnl2c+1UcAe6Qgce3sUpYOxwH86EvYqeJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUq8NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIlQ/9Hw9pSiSKSD5gIB3hkJKGpnfkRXXTaZgWVL+v+g0BZ4SDJEfi\r\nVHi3jqxtftiuJmIvmghSTIsxgSFi/XZKzIYCEjmp80JLYIfE6Xl5BYq6FMem\r\nyZiSTWNyDXp7J7dsCRgM7H43c6/29yOm52GIGE2FshdJ9Zuh9n21FDkZcxRd\r\nxsO6bzhvTgbfmaJFnS9aM2LgOysihE5bB9d+01muV9EIcLVi9AbZYN+/It4C\r\nAkdQhc6rBwuQQzJIKdM8o9JZsZDG8llHfhgnb4OebAaDxTK9sMrN6dW/n483\r\nCjbKfQpnGode0cXr4SgYnNLJasIeSld54C8Bv1iUVQYF5twLQPL3rWmXX7PR\r\nyRGxuyPq6aE2KM6CcnfShNT7Xt/SHTaBRDqt3MULETOyfa+a00W7ynPMcTei\r\nTpQSb4lRz8Dnyq2vMS+b3truDBUNOOnj+9bYoGjkfWGtwvcEwhwcVe7KFelk\r\naPaYN/dBe8spwYYxmENTuATJD3oxVUtdECTiQbmmZ1E9J2Wl7UsDhMCZvrec\r\n6fgvTVXR/A/BKlZCM0TsvWfQvK3Wrc/HtG9SHAXAlWVrBKRxyYZK6o1RndBG\r\nO6+FPial6dhoJmLN8Z7SjrQgUUfJn/CiQ2zqwXqEI5Omhw7EcrRvjP8MQH1d\r\nUcz4Yoq5ogKVgVpy9Eea8sk71hoaAACEO3w=\r\n=+uKx\r\n-----END PGP SIGNATURE-----\r\n","size":27383,"noattachment":false,"key":"/messageformat/-/messageformat-4.0.0-1.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-1_1666363149226_0.185323319382787"},"_hasShrinkwrap":false,"publish_time":1666363149450,"_cnpm_publish_time":1666363149450,"dist-tags":{"latest":"4.1.0"}}