{"name":"messageformat","version":"4.0.0-2","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":"b0196ca5261c4a624c0f4aac28d103e5f0079bae","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat@4.0.0-2","_nodeVersion":"19.1.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-gTp5afyD/R+Zzkskm9GoUi2hcta1FKFi6e4rHUK9jAU4frHl5d4e7Plx/aSuLlGT8qD7RC71q1iWe09BdAG/bg==","shasum":"bd25360f82c2f6c8cadbace137ecdd79b18418e5","tarball":"http://registry-npm.ywwl.com/messageformat/download/messageformat-4.0.0-2.tgz","fileCount":67,"unpackedSize":107851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSfcZUJNsY0pBgj1Ut+sbYjbG7fZXePB8I5GPwGlP7PAiEA+4unAb5Amq4pEHmD7O8v9SulYpbwLler94XbZySCQNY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkgcLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpR1Q/+J91+b+OGo6YAeCMeK0JkxP6wvEmHfaz81rLuJDWxf/1DlD13\r\nZOPsy7Vo3up/btBGGbNxZVl3OXT5T2fefhMzGQnVHpH6SsuDdA5LWgMBwSFw\r\ncyTY2DUB41OB3c+J5dN8CxB1oDkKhiTphkWDTtOTfwro0RMLycM0D4P3qm5z\r\nSzkUicFpUcvW2wnxsMlmKnAeR6bF8oGyO9Nu44thLTEh7VR0PWAMqu8qcpUu\r\nSnrl1dHEFk6kerzewCbZweXqKxDZPsXK6ghvdjJG4zNJHUEZaYCWXrSzj3Bu\r\nH/TdzJFnjWVZj/8da1T5c13GY8cUB9/awrhEhoCOwFaW7SV90B9xMWEeGSN1\r\nt4wUAvWe2jxTyzM6yOpeedA/vzxoDi0nDDdDOaUdcY60ZNSupWIqEpY8Rrjy\r\n4aUCbRypNrOBvfXFzQ7xIKOWNyZI23u/qc/3E6JzXSYZyOI5dgBE//wjnxHR\r\nVuJS28KCWNO3VRE2gimKvTt8qHxCBIL7e+VOtskQ5zEs4xtVzYCalPe63HMc\r\nU1E4J1EKGHM5hL+tqOTyBurWFtQSDW+Ti6oHScxWpc+goRI86221fhCK6dil\r\nhJTmpLCFwtYrpo05Nk1HuzbSj5stErdJYxvwUNnz17bFHBshKnqTKwwXBsNd\r\nDg5JRFB3DQWz4/o+KZVF3kJjYJzfE8SzCQ4=\r\n=XCfT\r\n-----END PGP SIGNATURE-----\r\n","size":25901,"noattachment":false,"key":"/messageformat/-/messageformat-4.0.0-2.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-2_1670514443261_0.30512752315773994"},"_hasShrinkwrap":false,"publish_time":1670514443507,"_cnpm_publish_time":1670514443507,"dist-tags":{"latest":"4.1.0"}}