{"library":"messageformat-parser","title":"messageformat-parser","description":"A PEG.js-based parser for ICU MessageFormat strings, used by the messageformat library to parse ICU message patterns into an AST. Current stable version is 4.1.3, with a release cadence aligned with the messageformat monorepo. Key differentiators: implements the ICUMessageFormat specification, supports plural, select, and complex patterns, and is the heritage parser before the shift to MF2 in messageformat v4. It is lightweight and focused solely on parsing.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install messageformat-parser"],"cli":null},"imports":["import { parse } from 'messageformat-parser'","import { PegParser } from 'messageformat-parser'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { parse } from 'messageformat-parser';\n\nconst ast = parse('You have {count, plural, one {# item} other {# items}}.');\nconsole.log(JSON.stringify(ast, null, 2));\n// Output shows parsed AST with type, plural, etc.","lang":"typescript","description":"Illustrates parsing an ICU MessageFormat string with plural arguments using messageformat-parser.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}