{"_id":"messageformat-parser","_rev":"289738","name":"messageformat-parser","description":"A PEG.js parser for ICU MessageFormat strings","dist-tags":{"latest":"4.1.3","next":"4.1.3"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"time":{"modified":"2021-06-03T18:47:58.000Z","created":"2016-04-17T20:13:12.612Z","4.1.3":"2020-04-12T13:10:04.102Z","4.1.2":"2019-07-17T18:00:36.736Z","4.1.1":"2019-05-02T14:47:48.245Z","4.1.0":"2019-03-03T15:55:24.993Z","4.0.0":"2018-12-05T11:55:46.136Z","3.0.0":"2018-04-04T09:11:35.035Z","3.0.0-beta.2":"2018-03-17T14:25:14.280Z","3.0.0-beta.1":"2018-03-17T12:44:27.619Z","2.0.0":"2017-11-18T10:29:57.058Z","1.1.0":"2017-07-18T06:20:07.085Z","1.0.0":"2016-09-01T22:52:48.007Z","1.0.0-rc.1":"2016-04-17T20:13:12.612Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git","directory":"packages/parser"},"versions":{"4.1.3":{"name":"messageformat-parser","version":"4.1.3","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git","directory":"packages/parser"},"main":"parser.js","eslintConfig":{"env":{"commonjs":true,"es6":true},"overrides":[{"files":["test.js"],"env":{"mocha":true},"rules":{"no-unused-vars":0}}]},"scripts":{"build":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"gitHead":"dd10833d8d39155b005ea2ba6ec7a87f4daf0cd2","readmeFilename":"README.md","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat-parser@4.1.3","_nodeVersion":"13.10.1","_npmVersion":"lerna/3.20.2/node@v13.10.1+x64 (darwin)","dist":{"shasum":"b824787f57fcda7d50769f5b63e8d4fda68f5b9e","size":12888,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-4.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-4.1.3.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_4.1.3_1586697003967_0.2938166965815976"},"_hasShrinkwrap":false,"publish_time":1586697004102,"_cnpm_publish_time":1586697004102},"4.1.2":{"name":"messageformat-parser","version":"4.1.2","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git"},"main":"parser.js","eslintConfig":{"env":{"commonjs":true,"es6":true},"overrides":[{"files":["test.js"],"env":{"mocha":true},"rules":{"no-unused-vars":0}}]},"devDependencies":{"chai":"^4.2.0","mocha":"^6.1.4","pegjs":"^0.10.0"},"scripts":{"build":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"gitHead":"cd47ed7db2b7a4f5e21df4cd6284ae3f7dad05a1","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat-parser@4.1.2","_nodeVersion":"11.9.0","_npmVersion":"lerna/3.15.0/node@v11.9.0+x64 (darwin)","dist":{"shasum":"fd34ec39912a14868a1595eaeb742485ab8ab372","size":12858,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-4.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-4.1.2.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_4.1.2_1563386436619_0.10977996789796873"},"_hasShrinkwrap":false,"publish_time":1563386436736,"_cnpm_publish_time":1563386436736},"4.1.1":{"name":"messageformat-parser","version":"4.1.1","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git"},"main":"parser.js","eslintConfig":{"env":{"commonjs":true,"es6":true},"overrides":[{"files":["test.js"],"env":{"mocha":true},"rules":{"no-unused-vars":0}}]},"devDependencies":{"chai":"^4.2.0","mocha":"^6.1.4","pegjs":"^0.10.0"},"scripts":{"build":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"gitHead":"6bf6b1de2df35276f2453b6b1173332513267e82","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat-parser@4.1.1","_nodeVersion":"11.9.0","_npmVersion":"lerna/3.13.4/node@v11.9.0+x64 (darwin)","dist":{"shasum":"665c70393f7b9b55a666ab27f6503ce0b5beeb1f","size":12834,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-4.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-4.1.1.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_4.1.1_1556808468098_0.5157047276833024"},"_hasShrinkwrap":false,"publish_time":1556808468245,"_cnpm_publish_time":1556808468245},"4.1.0":{"name":"messageformat-parser","version":"4.1.0","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/messageformat.git"},"main":"parser.js","eslintConfig":{"env":{"commonjs":true,"es6":true},"overrides":[{"files":["test.js"],"env":{"mocha":true},"rules":{"no-unused-vars":0}}]},"devDependencies":{"expect.js":"^0.3.1","mocha":"^5.2.0","pegjs":"^0.10.0"},"scripts":{"build":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"gitHead":"7594c61df39236cfa19268ae28a87099034fe5ea","_resolved":"","_integrity":"","_from":"file:messageformat-parser-4.1.0.tgz","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"_id":"messageformat-parser@4.1.0","_npmVersion":"6.5.0","_nodeVersion":"11.9.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"2bd21fd08db7233d0ef2af6d2c878fef2750c526","size":12648,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-4.1.0.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_4.1.0_1551628524826_0.09890771250702124"},"_hasShrinkwrap":false,"publish_time":1551628524993,"_cnpm_publish_time":1551628524993},"4.0.0":{"name":"messageformat-parser","version":"4.0.0","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","devDependencies":{"expect.js":"^0.3.1","mocha":"^4.1.0","pegjs":"^0.10.0"},"scripts":{"prepare":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"gitHead":"b6638652829b451fb1b9bada883c554da8120d4c","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@4.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"2c9abd15182c9a36f5085122013f4caf49b71738","size":11387,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-4.0.0.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_4.0.0_1544010946030_0.22258419325120515"},"_hasShrinkwrap":false,"publish_time":1544010946136,"_cnpm_publish_time":1544010946136},"3.0.0":{"name":"messageformat-parser","version":"3.0.0","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.js","codemod-fix-backslash-escapes.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^4.0.1","pegjs":"^0.10.0"},"scripts":{"prepare":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"gitHead":"02a06777d1ce5b99af4a6cbbeb80cebcbfb4de19","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"38ae9348eb4834ab19b3a8d682af7babb335f37a","size":10177,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-3.0.0.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_3.0.0_1522833094949_0.852994987088443"},"_hasShrinkwrap":false,"publish_time":1522833095035,"_cnpm_publish_time":1522833095035},"3.0.0-beta.2":{"name":"messageformat-parser","version":"3.0.0-beta.2","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.js","codemod-fix-backslash-escapes.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^4.0.1","pegjs":"^0.10.0"},"scripts":{"prepare":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"readmeFilename":"README.md","gitHead":"e6cb9d43820143fd65853d632c3ba0db86161054","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@3.0.0-beta.2","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"7fa93864b12465933e8f53e7a3e6c374e6d70703","size":10183,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-3.0.0-beta.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-3.0.0-beta.2.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_3.0.0-beta.2_1521296714185_0.3150158122307032"},"_hasShrinkwrap":false,"publish_time":1521296714280,"_cnpm_publish_time":1521296714280},"3.0.0-beta.1":{"name":"messageformat-parser","version":"3.0.0-beta.1","description":"A PEG.js parser for ICU MessageFormat strings","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.js","codemod-fix-backslash-escapes.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^4.0.1","pegjs":"^0.10.0"},"scripts":{"prepare":"pegjs parser.pegjs","prepublishOnly":"npm test","test":"mocha"},"readmeFilename":"README.md","gitHead":"9b3ae2687cf72c2d58f6e1d5fb158247bb573af2","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@3.0.0-beta.1","_npmVersion":"5.6.0","_nodeVersion":"9.5.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"7574d17228a7e024510f04728f710fa1630d5523","size":10688,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-3.0.0-beta.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-3.0.0-beta.1.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser_3.0.0-beta.1_1521290667546_0.3931494078752473"},"_hasShrinkwrap":false,"publish_time":1521290667619,"_cnpm_publish_time":1521290667619},"2.0.0":{"name":"messageformat-parser","version":"2.0.0","description":"A PEG.js parser for ICU MessageFormat strings -- part of messageformat.js","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.pegjs","parser.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^4.0.1","pegjs":"^0.10.0"},"scripts":{"prepublish":"pegjs parser.pegjs","test":"mocha"},"gitHead":"bddb72f0c71069e92f3c52c73ae626fea7958dad","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@2.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.8.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"e37efa0cb07b6784e5f3adc089cbf266208c01c7","size":11145,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-2.0.0.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser-2.0.0.tgz_1511000996175_0.46639939048327506"},"directories":{},"publish_time":1511000997058,"_hasShrinkwrap":false,"_cnpm_publish_time":1511000997058},"1.1.0":{"name":"messageformat-parser","version":"1.1.0","description":"A PEG.js parser for ICU MessageFormat strings -- part of messageformat.js","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Nikola Kovacs","email":"nikola.kovacs@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.pegjs","parser.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^3.0.2","pegjs":"^0.10.0"},"scripts":{"prepublish":"pegjs parser.pegjs","test":"mocha"},"gitHead":"524e8fb4d90b3cef43e317c94d18ca565eebddcd","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@1.1.0","_npmVersion":"5.3.0","_nodeVersion":"8.1.3","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"13ba2250a76bbde8e0fca0dbb3475f95c594a90a","size":9527,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-1.1.0.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/messageformat-parser-1.1.0.tgz_1500358806190_0.3648966371547431"},"directories":{},"publish_time":1500358807085,"_hasShrinkwrap":false,"_cnpm_publish_time":1500358807085},"1.0.0":{"name":"messageformat-parser","version":"1.0.0","description":"A PEG.js parser for ICU MessageFormat strings -- part of messageformat.js","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.pegjs","parser.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^3.0.2","pegjs":"^0.10.0"},"scripts":{"prepublish":"pegjs parser.pegjs","test":"mocha"},"gitHead":"99d179eb4216395ff730ba8cc9a8a8bf3385b343","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@1.0.0","_shasum":"3dea21419f141c50026a29d4b2239203ad613d3f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"dist":{"shasum":"3dea21419f141c50026a29d4b2239203ad613d3f","size":8251,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-1.0.0.tgz"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/messageformat-parser-1.0.0.tgz_1472770365921_0.41532221157103777"},"directories":{},"publish_time":1472770368007,"_cnpm_publish_time":1472770368007,"_hasShrinkwrap":false},"1.0.0-rc.1":{"name":"messageformat-parser","version":"1.0.0-rc.1","description":"A PEG.js parser for ICU MessageFormat strings -- part of messageformat.js","keywords":["icu","messageformat","parser"],"contributors":[{"name":"Alex Sexton","email":"alexsexton@gmail.com"},{"name":"Eemeli Aro","email":"eemeli@gmail.com"},{"name":"Adrian Vogelsgesang","email":"adrian.vogelsgesang@tum.de"}],"license":"MIT","homepage":"https://messageformat.github.io/","repository":{"type":"git","url":"git+https://github.com/messageformat/parser.git"},"main":"parser.js","files":["parser.pegjs","parser.js"],"devDependencies":{"expect.js":"^0.3.1","mocha":"^2.4.5","pegjs":">=0.8.0"},"scripts":{"prepublish":"pegjs parser.pegjs","test":"mocha"},"gitHead":"f592a330d7856a1e6379df6c33e13d3bc097be71","bugs":{"url":"https://github.com/messageformat/parser/issues"},"_id":"messageformat-parser@1.0.0-rc.1","_shasum":"70df3613797df18975529966cb481c0a7d9631df","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"}],"dist":{"shasum":"70df3613797df18975529966cb481c0a7d9631df","size":8186,"noattachment":false,"key":"/messageformat-parser/-/messageformat-parser-1.0.0-rc.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/messageformat-parser/download/messageformat-parser-1.0.0-rc.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/messageformat-parser-1.0.0-rc.1.tgz_1460923991353_0.2238752585835755"},"directories":{},"publish_time":1460923992612,"_cnpm_publish_time":1460923992612,"_hasShrinkwrap":false}},"readme":"# messageformat-parser <a href=\"http://travis-ci.org/messageformat/parser\"><img align=\"right\" alt=\"Build Status\" src=\"https://secure.travis-ci.org/messageformat/parser.png\"></a>\n\nA [PEG.js] parser for [ICU MessageFormat] strings – part of [messageformat].\nOutputs an AST defined by [parser.pegjs].\n\nThe generated `parse(src, [options])` function takes two parameters, first the\nstring to be parsed, and a second optional parameter `options`, an object with\nthe following possible keys:\n\n- `cardinal` and `ordinal` – Arrays of valid plural categories for the current\n  locale, used to validate `plural` and `selectordinal` keys. If these are\n  missing or set to false, the full set of valid [Unicode CLDR] keys is used:\n  `'zero', 'one', 'two', 'few', 'many', 'other'`. To disable this check, pass in\n  an empty array.\n\n- `strict` – By default, the parsing applies a few relaxations to the ICU\n  MessageFormat spec. Setting `strict: true` will disable these relaxations:\n  - The `argType` of `simpleArg` formatting functions will be restricted to the\n    set of `number`, `date`, `time`, `spellout`, `ordinal`, and `duration`,\n    rather than accepting any lower-case identifier that does not start with a\n    number.\n  - The optional `argStyle` of `simpleArg` formatting functions will not be\n    parsed as any other text, but instead as the spec requires: \"In\n    argStyleText, every single ASCII apostrophe begins and ends quoted literal\n    text, and unquoted {curly braces} must occur in matched pairs.\"\n  - Inside a `plural` or `selectordinal` statement, a pound symbol (`#`) is\n    replaced with the input number. By default, `#` is also parsed as a special\n    character in nested statements too, and can be escaped using apostrophes\n    (`'#'`). In strict mode `#` will be parsed as a special character only\n    directly inside a `plural` or `selectordinal` statement. Outside those, `#`\n    and `'#'` will be parsed as literal text.\n\nThe parser only supports the default `DOUBLE_OPTIONAL` [apostrophe mode], in\nwhich a single apostrophe only starts quoted literal text if it immediately\nprecedes a curly brace `{}`, or a pound symbol `#` if inside a plural format. A\nliteral apostrophe `'` is represented by either a single `'` or a doubled `''`\napostrophe character.\n\n[icu messageformat]: https://messageformat.github.io/guide/\n[messageformat]: https://messageformat.github.io/\n[parser.pegjs]: ./parser.pegjs\n[peg.js]: http://pegjs.org/\n[unicode cldr]: http://cldr.unicode.org/index/cldr-spec/plural-rules\n[apostrophe mode]: http://www.icu-project.org/apiref/icu4c/messagepattern_8h.html#af6e0757e0eb81c980b01ee5d68a9978b\n\n## Installation\n\n```sh\nnpm install messageformat-parser\n```\n\n## Usage\n\n```js\n> var parse = require('messageformat-parser').parse;\n\n> parse('So {wow}.')\n[ 'So ', { type: 'argument', arg: 'wow' }, '.' ]\n\n> parse('Such { thing }. { count, selectordinal, one {First} two {Second}' +\n        '                  few {Third} other {#th} } word.')\n[ 'Such ',\n  { type: 'argument', arg: 'thing' },\n  '. ',\n  { type: 'selectordinal',\n    arg: 'count',\n    offset: 0,\n    cases:\n     [ { key: 'one', tokens: [ 'First' ] },\n       { key: 'two', tokens: [ 'Second' ] },\n       { key: 'few', tokens: [ 'Third' ] },\n       { key: 'other', tokens: [ { type: 'octothorpe' }, 'th' ] } ] },\n  ' word.' ]\n\n> parse('Many{type,select,plural{ numbers}selectordinal{ counting}' +\n                         'select{ choices}other{ some {type}}}.')\n[ 'Many',\n  { type: 'select',\n    arg: 'type',\n    cases:\n     [ { key: 'plural', tokens: [ ' numbers' ] },\n       { key: 'selectordinal', tokens: [ ' counting' ] },\n       { key: 'select', tokens: [ ' choices' ] },\n       { key: 'other', tokens: [ ' some',\n                                 { type: 'argument', arg: 'type' } ] } ] },\n  '.' ]\n\n> parse('{Such compliance')\n// SyntaxError: Expected \",\", \"}\" or [ \\t\\n\\r] but \"c\" found.\n\n> var msg = '{words, plural, zero{No words} one{One word} other{# words}}';\n> var englishKeys = { cardinal: [ 'one', 'other' ],\n                      ordinal: [ 'one', 'two', 'few', 'other' ] };\n> parse(msg)\n[ { type: 'plural',\n    arg: 'words',\n    offset: 0,\n    cases:\n     [ { key: 'zero', tokens: [ 'No words' ] },\n       { key: 'one', tokens: [ 'One word' ] },\n       { key: 'other', tokens: [ { type: 'octothorpe' }, ' words' ] } ] } ]\n\n> parse(msg, englishKeys)\n// Error: Invalid key `zero` for argument `words`. Valid plural keys for this\n//        locale are `one`, `other`, and explicit keys like `=0`.\n```\n\nFor more example usage, please take a look at our [test suite](./test.js).\n\n## Structure\n\nThe output of `parse()` is a `Token` array:\n\n```typescript\ntype Token = string | Argument | Plural | Select | Function\n\ntype Argument = {\n  type: 'argument',\n  arg: Identifier\n}\n\ntype Plural = {\n  type: 'plural' | 'selectordinal',\n  arg: Identifier,\n  offset: number,\n  cases: PluralCase[]\n}\n\ntype Select = {\n  type: 'select',\n  arg: Identifier,\n  cases: SelectCase[]\n}\n\ntype Function = {\n  type: 'function',\n  arg: Identifier,\n  key: Identifier,\n  param: {\n    tokens: options.strict ? [string] : (Token | Octothorpe)[]\n  } | null\n}\n\ntype PluralCase = {\n  key: 'zero' | 'one' | 'two' | 'few' | 'many' | 'other' | '=0' | '=1' | '=2' | ...,\n  tokens: (Token | Octothorpe)[]\n}\n\ntype SelectCase = {\n  key: Identifier,\n  tokens: options.strict ? Token[] : (Token | Octothorpe)[]\n}\n\ntype Octothorpe = {\n  type: 'octothorpe'\n}\n\ntype Identifier = string  // not containing whitespace or control characters\n```\n\n## License & Contributor License Agreement\n\nReleased under the MIT license. See the [messageformat README][cla] for details.\n\n[cla]: https://github.com/messageformat/messageformat.js#contributor-license-agreement\n","_attachments":{},"readmeFilename":"README.md","homepage":"https://messageformat.github.io/","bugs":{"url":"https://github.com/messageformat/messageformat/issues"},"license":"MIT"}