{"name":"@messageformat/number-skeleton","version":"1.0.0-beta.1","description":"A parser & formatter for ICU NumberFormat skeleton strings & patterns","keywords":["icu","messageformat","numberformatter","skeleton","parser","formatter"],"author":{"name":"Eemeli Aro","email":"eemeli@gmail.com"},"license":"MIT","homepage":"https://github.com/messageformat/messageformat/tree/master/packages/number-skeleton#readme","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git","directory":"packages/number-skeleton"},"type":"module","main":"lib/index.js","scripts":{"build":"tsc","extract-api":"api-extractor run --local --verbose"},"gitHead":"af63ee0186c6f9ac2255da2ad476fd3d74cfa6ed","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"@messageformat/number-skeleton@1.0.0-beta.1","_nodeVersion":"14.7.0","_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (darwin)","dist":{"integrity":"sha512-vEosYy7en3xbzigvC6LVB0w8AynjhwE4IeyRh4heskbCkU0RyrZpuj3y4wunzOjhef3PohYzUQeAay5slN0pNA==","shasum":"30cb9867ccc37665a8690c26d0d42d4467e3fefe","tarball":"http://registry-npm.ywwl.com/@messageformat/number-skeleton/download/@messageformat/number-skeleton-1.0.0-beta.1.tgz","fileCount":38,"unpackedSize":79115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfw9feCRA9TVsSAnZWagAANM4P/2/9DDZrX6zujgkZtBht\nlrP36TGBEwJ+VtAsTRGI3B6OKoRm92ykpT+8jE593WFCZ/x7xTUW0XMebs44\nYhvYTQOsMUve8YpaMmGtGW3ikUvAY5ytlVUFWcVb3zawLyzsAOtPypQwx80C\n81CGcvtNYAGrKYc6rBOy2KK4yKmG5xrfXc+q6i6fC7DqfklODmwFCPo0GSjI\n9NmPLZ7IZpn0OdgH28tvTrmqKpuQiHsyXs7m76VmHXkkF5LZZEtOR9ELOcaJ\nhsCkwBxZ3ry7DlpA6bt5bKdJ+hqjhkppomNJKdfAvTxHmo/nL4jPol6XZK9/\nNJi4J9T6x8n3d1z+hQFdsFP2j4fRTdNraC8lZZMzC4wgapg4jnXIu8IrAbKG\nlmEOlFUtfxIqKYAic4/zRtJoyT4KK4eJTubcPsLzgm67ZpKiP5MktcVeXV6y\n86LLr+HeRuqD6Xn0sPH82Cen/p4V9S96Er0wPdPq6Xa2nFu54l+wo/rBImRt\nxs7sIAdXMM4fhJVBTa0zBkGdUp2Qd+R77wuYU+UTULqs7hSNSdiu16LbX/J1\nHu+TcFeJoJZkOcx7hXB3pifPiE2p6+RgPyiaG6oHSlRYZb2uKdUijItuD5/f\nqXMcG2dVRTnpZvTAuix9O0xk9+HqK4c8Omj1FdGRv3rZscwUe3ecLGCxx0k4\nczvi\r\n=tiNO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4ossm7LPJIW/R/wodoon1o32JOPVw3RbXkG3Z5jAUjAIgTxnYD7HvRPA0JJM6XqIEjZZuXFRnctLru/oYouttAVw="}],"size":17943,"noattachment":false,"key":"/@messageformat/number-skeleton/-/@messageformat/number-skeleton-1.0.0-beta.1.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.0.0-beta.1_1606670302309_0.8436864556116659"},"_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":1606670302446,"_cnpm_publish_time":1606670302446,"dist-tags":{"latest":"1.2.0","next":"2.0.0-0"}}