{"name":"@messageformat/number-skeleton","version":"1.0.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","extract-api":"api-extractor run --local --verbose"},"gitHead":"33ca9027809512d85bd7d212957afb85e7dd39c4","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"@messageformat/number-skeleton@1.0.0","_nodeVersion":"15.11.0","_npmVersion":"lerna/3.22.1/node@v15.11.0+x64 (darwin)","dist":{"integrity":"sha512-Pe1HX/VG0q7tclM/ri85I4FKYd7Uc3gluSZbRaK1+jcXdT9Biw2hLAKyMsiz2tM6zLiK1xX+K0NMDO4RIstQig==","shasum":"1864b8b65abbee57a02bc8ea67061aa132947af7","tarball":"http://registry-npm.ywwl.com/@messageformat/number-skeleton/download/@messageformat/number-skeleton-1.0.0.tgz","fileCount":38,"unpackedSize":79467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnRWECRA9TVsSAnZWagAApHAP/1OI3e19+zwGv5ePD+SQ\nCqX6cz4knx9RYJLmz51Eu+mkWNQGSFw/+PT85d7JRl/yrRl7py9MtiNlEJ+5\nJJSk2GRIc2s3/j4YLr25B3GtCTlxO/H7+ngo9ifHjnssRaWs2mVUPw9MxS4c\navBe9x1//YB8HLalZnZNu8h8FsmZjFx252ZYdmYxZoN4HaKe5HHPHlKj3UzY\nPO67Xq/b6/HScfYTVqd3pXvR5Afq9B7isUM4mhvXSDLPZVZdVSASQiFYCZUB\n4b4gkXMSgmzrwDv4Ne6Xzarzse4g5iG2drhLbtZFUKM/lzpR4xglvGhKCEvs\nDN4h29Fk5OFi5nKPdbEaZsliUv1Mr/R9bZpLOeH7ISchu46fS7S2xykwa3Jr\n2t9zaTuYmOLffvg/OEmI068j2YfKd6202HUYrW72fRbg8nYcqxSwuGc28KWq\n4shQbwkVWqDFJgOXDcX7MK/bUzHngpxuUrfL0D7ze8grqdHT9H3vPPeyJqVS\nrSsUt+kxjoL+k+NT8xjhaAvm+7ydOGkBM4NeeEMfq6sbOIMjRJv1ypMDgGTt\notsWTK1u/ey/Y8pqx1PrCoDvyNZ7dsIgaYywv9lD10Qxya8aw+deIGW9flJm\nw5HuZ/f1F6PhMbQtDxELCdXYEgA4HbyspEG5D8DYxPveU4EISJloYi2c3rBm\nxhIm\r\n=cqH/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG0+a33bIWOCJwMN16y7cyZbUj0WC+scgoDL8ku2Mq21AiEAuXEhGrstPPU6qf00G45Wc5FIpGGVWWcOdnxzA1HKEuc="}],"size":18068,"noattachment":false,"key":"/@messageformat/number-skeleton/-/@messageformat/number-skeleton-1.0.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.0.0_1620907395998_0.4322653489857098"},"_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":1620907396171,"_cnpm_publish_time":1620907396171,"dist-tags":{"latest":"1.2.0","next":"2.0.0-0"}}