{"name":"@messageformat/number-skeleton","version":"1.1.0","description":"A parser & formatter for ICU NumberFormat skeleton strings & patterns","keywords":["icu","messageformat","numberformatter","skeleton","parser","formatter"],"contributors":[{"name":"Eemeli Aro","email":"eemeli@gmail.com"}],"license":"MIT","homepage":"http://messageformat.github.io/messageformat/api/number-skeleton/","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git","directory":"packages/number-skeleton"},"type":"module","main":"lib/index.js","scripts":{"build":"tsc --project tsconfig.build.json","extract-api":"api-extractor run --verbose"},"types":"./lib/index.d.ts","gitHead":"ccc54e801761fcb1796d0b283cc3036e4f539d21","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"@messageformat/number-skeleton@1.1.0","_nodeVersion":"18.3.0","_npmVersion":"8.14.0","dist":{"integrity":"sha512-F0Io+GOSvFFxvp9Ze3L5kAoZ2NnOAT0Mr/jpGNd3fqo8A0t4NxNIAcCdggtl2B/gN2ErkIKSBVPrF7xcW1IGvA==","shasum":"eb636738da8abbd35ccbeb84f7d84d63302aeb61","tarball":"http://registry-npm.ywwl.com/@messageformat/number-skeleton/download/@messageformat/number-skeleton-1.1.0.tgz","fileCount":37,"unpackedSize":77464,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7/eFCsTaJhsx3gt9vy/3BUl0hoYo7Y0+4AB8YD3sEhAiEAxz+eyKDoD92fQM298f644aG3aiEOpLTylLbKlQV1GhY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0wZUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpkfw//YLUsZIYq1Geb4v4vaaxCQy+N3vkaNqoPQiVPjT9LZq5Gp73z\r\nrMGAowGFoHxfGToRMaNtEsUJF0g5HhTnAMzKjr0/zdA+Q3Z6Tj2fsp6m7+Lw\r\nMwXNNLzNnU/CmrM1Y7lFsJjC6Qf5q/bl/2REIEN7+U+J43rKl8CfP15r4DRP\r\nbFuqNzhevTgNCXhEgpNq9UzZjpJ5thBthnhvhErp8yhqW8YQQ8ydRnU+H2xf\r\nIUV6YkWkieugO6P0uLPb9reUNCj5k9BUuByaiZkwSD26yLpfwMJ4W/Qr/Z5C\r\nwnlWHgqf10tGMDOpJu/fIYMU6nQsPWJbrBNDt2zoPXt9s6oclzvkM519NOfc\r\ntVMbAEiJobGvTVwp1YBFyUiQutzbUF40dY6nvgy93sxdJbSvoZVQZZ/nqipC\r\npqsVXeGXsDoPH1R8Cccr1iLoxdbhnGsv56nUZ7r4LQ1zNod8H67KZ/ElC/tZ\r\n8hzg93JqCPntp7E/oACGK36bRmTDeq+IzbNywJ1qQzESdWdDzoTowk2diDnr\r\nZNSaEkPfOS7YMlfgst48FS+8J6cm+UKPNXuitQeIv+nS3+Kp/iFbxg6E8BBa\r\n3zKkWnUGZ/w0eTUazBg/ONiOEQ2RxU7Xe+UcvdDA+JHRc+CQjk0ryf0aS1tT\r\nrVkWPFky6r2n8Siabp14Uoq4fnoLH/d81hE=\r\n=f60F\r\n-----END PGP SIGNATURE-----\r\n","size":17210,"noattachment":false,"key":"/@messageformat/number-skeleton/-/@messageformat/number-skeleton-1.1.0.tgz"},"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"directories":{},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-skeleton_1.1.0_1657996884072_0.593402616134489"},"_hasShrinkwrap":false,"readme":"# @messageformat/number-skeleton\n\nTools for working with [ICU NumberFormat skeletons](https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md) and [patterns](http://unicode.org/reports/tr35/tr35-numbers.html#Number_Format_Patterns)<!-- -->.\n\n```js\nimport {\n  getNumberFormatter,\n  getNumberFormatterSource,\n  NumberFormatError,\n  parseNumberPattern,\n  parseNumberSkeleton,\n  Skeleton, // TS only\n  Unit // TS only\n} from '@messageformat/number-skeleton';\n```\n\nThe package is released as an ES module only. If using from a CommonJS context, you may need to `import()` it, or use a module loader like [esm](https://www.npmjs.com/package/esm)<!-- -->.\n\nUses [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) internally, including features provided by the [Unified API Proposal](https://github.com/tc39/proposal-unified-intl-numberformat)<!-- -->.\n\n## Classes\n\n| Class                                                                                                                               | Description                                                                                                                                                                 |\n| ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [NumberFormatError](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.numberformaterror.md) | Base class for errors. In addition to a <code>code</code> and a human-friendly <code>message</code>, may also includes the token <code>stem</code> as well as other fields. |\n\n## Functions\n\n| Function                                                                                                                                                                                | Description                                                                                                                                                                                                                                                                                                                        |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [getNumberFormatter(locales, skeleton, currency, onError)](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.getnumberformatter.md)             | Returns a number formatter function for the given locales and number skeleton                                                                                                                                                                                                                                                      |\n| [getNumberFormatterSource(locales, skeleton, currency, onError)](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.getnumberformattersource.md) | Returns a string of JavaScript source that evaluates to a number formatter function with the same <code>(value: number) =&gt; string</code> signature as the function returned by [getNumberFormatter()](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.getnumberformatter.md)<!-- -->. |\n| [parseNumberPattern(src, currency, onError)](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.parsenumberpattern.md)                           | Parse an [ICU NumberFormatter pattern](http://unicode.org/reports/tr35/tr35-numbers.html#Number_Format_Patterns) string into a [Skeleton](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.skeleton.md) structure.                                                                        |\n| [parseNumberSkeleton(src, onError)](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.parsenumberskeleton.md)                                   | Parse an [ICU NumberFormatter skeleton](https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md) string into a [Skeleton](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.skeleton.md) structure.                                                |\n\n## Interfaces\n\n| Interface                                                                                                         | Description                                                                              |\n| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |\n| [Skeleton](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.skeleton.md) | An object representation of a parsed string skeleton, with token values grouped by type. |\n\n## Type Aliases\n\n| Type Alias                                                                                                | Description                                                                                                                |\n| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |\n| [Unit](https://github.com/messageformat/skeletons/blob/master/docs/messageformat-number-skeleton.unit.md) | Measurement units defined by the [Unicode CLDR](https://github.com/unicode-org/cldr/blob/d4d77a2/common/validity/unit.xml) |\n\n---\n\n[Messageformat] is an OpenJS Foundation project, and we follow its [Code of Conduct].\n\n[messageformat]: https://messageformat.github.io/\n[code of conduct]: https://github.com/openjs-foundation/cross-project-council/blob/master/CODE_OF_CONDUCT.md\n\n<a href=\"https://openjsf.org\">\n<img width=200 alt=\"OpenJS Foundation\" src=\"https://messageformat.github.io/messageformat/logo/openjsf.svg\" />\n</a>\n","publish_time":1657996884248,"_cnpm_publish_time":1657996884248,"dist-tags":{"latest":"1.2.0","next":"2.0.0-0"}}