{"bugs":{"url":"https://github.com/cherow/cherow/issues"},"dist":{"shasum":"25c71e20c09b8c3ea52008d8c97e31668a03004f","tarball":"https://registry.npmjs.org/cherow/-/cherow-1.6.8-dev.20190119.tgz","fileCount":66,"integrity":"sha512-5DppyQfzBWCheBlpSkI7UF01AFkVeUD94oS1SexHW1mXHWdMvnlFo+46xqmuMn8VQ5l+6um5jHYKtR+5B590DQ==","signatures":[{"sig":"MEUCIQDYMH4SoOnlspjnVpVYCEET2rlD+aqXi5tctbFYKpmIVAIgNKIrj5u8tib1j7X2pNGBsJoR0pJKgX9DNgyt/8fhvQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1962375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQmlZCRA9TVsSAnZWagAAI0gP/ij+IDHUGgC7QucMVv8z\n66kDjnaD7Lza65UYQAF5aDnKzbgmAMOBeeRPIpWRI2b9zW7C7PnOhbUx7NGD\naDv37gfD9kqcvddvOjkARhLkaP4uTK5bUI5HihPLkXVKU+JtJabVzopqoD8D\nV5QKnm9591e5UsSThorKhaJ0VJ44T3U0CVsI2exuNeDJ2BfOD0TdI6dDqDaC\nXgPW3gMvBp6fsLk3eO859iE7+X/jjh3FDKL6Zq2J30pJFxkYCqv1Z7c7aNwg\nnsOalGcGmHYcjHM1hWiGtUh6H9dtbLRGdOP+NeDHntFNBRCovtQtVBkR52S1\nvaqeYUkh4SrNqzdAL5qPjBsN0HzzCZom3buPcJXv0iBK8Kl0lvLhW6QIg8W8\nblkzQrNnVCDSi2aVRYScZsRpKpZmzb6mWw03Sl3xS38WNjAqRiBZjolWIKYa\ny1H7qfsZwYmTLmsumOcMgXYs9FZZYqFPQm9Hpv0F8ICDovV5eO6iJKdV8hpk\nDbHvgY1KJAB2rjdBm6AQUOL7APG/HysukDKkbCu/c12s7yELWRQq3ZE2GO6H\nZQUDAczh38WhikFQRCIuBCc6ZK0kBh99q18j175e1Ic/QDjXAXwgnjIT9p6s\nIocUn0IaZLT9t728j2S22Z+hrmlKQd869vAegl/CjpnEYprR9WNPg6rA2P05\nZWNZ\r\n=DST5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cherow.umd.js","name":"cherow","husky":{"hooks":{"pre-commit":"node ./scripts/prettier.js check-changed"}},"types":"dist/cherow.d.ts","author":{"name":"KFlash"},"module":"dist/cherow.esm.js","readme":"# Cherow\n\n[![NPM version](https://img.shields.io/npm/v/cherow.svg?style=flat-square)](https://www.npmjs.com/package/cherow)\n[![Gitter chat](https://img.shields.io/gitter/room/Cherow/cherow.svg?style=flat-square)](https://gitter.im/cherow/cherow)\n[![CircleCI](https://img.shields.io/circleci/project/github/cherow/cherow/master.svg?style=flat-square)](https://circleci.com/gh/cherow/cherow)\n[![Coverage Status](https://img.shields.io/coveralls/github/cherow/cherow/master.svg?style=flat-square)](https://coveralls.io/github/cherow/cherow?branch=master)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/cherow/cherow.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/cherow/cherow/context:javascript)\n[![Total Alerts](https://img.shields.io/lgtm/alerts/g/cherow/cherow.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/cherow/cherow/alerts)\n\nA very fast and lightweight, standards-compliant, self-hosted javascript parser with high focus on both performance and stability.\n\n## [Demo](https://cherow.github.io/cherow/) and [Benchmark](https://cherow.github.io/cherow/performance/)\n\n\n## Features\n\n* Conforms to the standard ECMAScript® 2019 [(ECMA-262 9th Edition)](https://tc39.github.io/ecma262/) language specification (*draft*)\n* Support for all stage 3 proposals via option.\n* JSX support via option.\n* Experimental feature support via option.\n* Optionally track syntactic node locations\n* Emits an [ESTree-compatible](https://github.com/estree/estree) abstract syntax tree.\n* Very well tested (~26 000 [unit tests](https://github.com/cherow/cherow/tree/master/test) with [full code coverage)](https://coveralls.io/github/cherow/cherow))\n* Supports all module loaders\n* Lightweight - ~70 KB minified (*18 kb smaller than Acorn*)\n\n## ESNext features\n\n`Stage 3` features support. These need to be enabled with the `next` option.\n\n* [Import()](https://github.com/tc39/proposal-dynamic-import)\n* [Hashbang Grammar](https://github.com/tc39/proposal-hashbang)\n* [Private methods and getter/setters for JavaScript classes](https://github.com/tc39/proposal-private-methods)\n* [BigInt](https://github.com/tc39/proposal-bigint)\n* [Import.meta](https://github.com/tc39/proposal-import-meta)\n\n## API\n\nCherow generates AST according to [ESTree AST format](https://github.com/estree/estree), and can be used to perform [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program, and with ES2015 and later a JavaScript program can be either [a script or a module](http://www.ecma-international.org/ecma-262/8.0/index.html#sec-ecmascript-language-scripts-and-modules).\n\nThe `parse` method exposed by Cherow takes an optional `options` object which allows you to specify whether to parse in [`script`](http://www.ecma-international.org/ecma-262/8.0/#sec-parse-script) mode (the default) or in [`module`](http://www.ecma-international.org/ecma-262/8.0/#sec-parsemodule) mode.\n\n\nHere is a quick example to parse a script:\n\n```js\n\ncherow.parseScript('g_plane = chinese');\n\n// or\n\ncherow.parse('x = async() => { for await (x of xs); }');\n\n```\n\nThis will return when serialized in json:\n\n```js\n{\n    body: [{\n        expression: {\n            left: {\n                name: 'x',\n                type: 'Identifier'\n            },\n            operator: '=',\n            right: {\n                async: true,\n                body: {\n                    body: [{\n                        await: true,\n                        body: {\n                            type: 'EmptyStatement',\n                        },\n                        left: {\n                            name: 'x',\n                            type: 'Identifier',\n                        },\n                        right: {\n                            name: 'xs',\n                            type: 'Identifier',\n                        },\n                        type: 'ForOfStatement',\n                    }],\n                    type: 'BlockStatement'\n                },\n                expression: false,\n                generator: false,\n                id: null,\n                params: [],\n                type: 'ArrowFunctionExpression'\n            },\n            type: 'AssignmentExpression'\n        },\n        type: 'ExpressionStatement'\n    }],\n    sourceType: 'script',\n    type: 'Program'\n}\n```\n\n## Options\n\nThe second argument allows you to specify various options:\n\n| Option        | Description |\n| ----------- | ------------------------------------------------------------ |\n| `module`          | Enable module syntax |\n| `loc`             | Attach line/column location information to each node |\n| `ranges`          | Append start and end offsets to each node |\n| `globalReturn`    | Allow return in the global scope |\n| `disableWebCompat` | Allows parsing without AnnexB |\n| `impliedStrict`   | Enable strict mode initial enforcement |\n| `next`            | Enable stage 3 support (*ESNext*)  |\n| `jsx`             | Enable React JSX parsing  |\n| `source`          | Set to true to record the source file in every node's `loc` object when the `loc option` is set.  |\n| `experimental`    | Enable experimental features\n| `raw`             | Attach raw property to each literal node and identifier node |\n| `native`          | Enable \"native\" NodeJS / V8 features |\n| `directives`      | Enable [directive prologue](https://github.com/danez/estree/blob/directive/es5.md#directive) to each literal node |\n| `onComment`       | Accept either callback or array to collect comment |\n| `onToken`         | Accept either callback or array and returns each found token |\n\n## Contributing\n\nIf you feel something could've been done better, please do feel free to file a pull request with the changes.\n\nRead our guidelines [here](CONTRIBUTING.md)\n\n## Bug reporting\n\nIf you caught a bug, don't hesitate to report it in the issue tracker. From the moment I respond to you, it will take maximum 60 minutes before the bug is fixed.\n\nNote that I will try to respond to you within one hour. Sometimes it can take a bit longer. I'm not allways online. And if I find out it\nwill take more then 60 minutes to solve your issue, you will be notified.\n\nI know how irritating it can be if you are writing code and encounter bugs in your dependencies. And even more frustrating if you need to wait weeks or days.\n\n\n## Rationale\n\nExisting parsers have many issues with them:\n\n* `Acorn` is the most commonly used tool out there because of its support for recent ES standards, but it's slow and it often is too permissive in what it accepts. It's also not optimized for handheld devices.\n\n* `Esprima` is a little faster than Acorn, but it's almost never updated, and their test suite has too many invalid tests. It also doesn't support recent ES standards.\n\n* `Babylon` is highly coupled to Babel, and is comparatively very slow and buggy, and failing to correctly handle even stable ECMAScript standard features.\n\nNone of these parsers would fare any chance against the official Test262 suite, and most fail a substantial number of them.\n\nWe figured we could *try* do better. *We* are used in plural form because Cherow is developed by a main developer and two\nothers \"*behind the scenes*\" that contributes with their knowledge whenever it's necessary.\n\n---\n\nCross-browser testing provided by:\n\n<a href=\"http://browserstack.com\"><img height=\"70\" src=\"https://i.imgur.com/O9USsNQ.png\" alt=\"BrowserStack\"></a>\n","browser":"dist/cherow.umd.js","gitHead":"7ad02c95e867d70fff92201e4532860893f5dc68","license":"ISC","scripts":{"fuzz":"eslump ./test/fuzz/cherow.js .fuzz-output/","lint":"cross-env tslint -p tsconfig.json -t stylish","test":"cross-env TS_NODE_PROJECT=\"test/tsconfig.json\" mocha \"test/**/*.ts\" -c -R progress -r ts-node/register -r source-map-support/register --recursive --globals expect","build":"tsc","bundle":"cross-env rimraf dist && node scripts/bundle.js","coverage":"cross-env TS_NODE_PROJECT=\"test/tsconfig.json\" nyc -n \"src/**/*.ts\" -e .ts -i ts-node/register -r text-summary -r lcov -r html npm test","prettier":"node ./scripts/prettier.js write-changed","test:watch":"npm run test -- --watch --watch-extensions ts","build:watch":"tsc -w","prettier-all":"node ./scripts/prettier.js write","test:verbose":"npm run test -- -R spec","post_coverage":"cross-env cat ./coverage/lcov.info | coveralls","prepare-nightly":"node scripts/bump-dev-version","test:watch:verbose":"npm run test:watch -- -R spec"},"typings":"dist/cherow.d.ts","_npmUser":{"name":"kennyf","email":"kfrachelle123@gmail.com"},"homepage":"https://github.com/cherow/cherow","keywords":["parsing","ecmascript","typescript","parser","performance","tolerant","estree","es2018","es2019","ECMAScript 2019","esnext","javascript","ast","jsx","tolerant","lightweight"],"repository":{"url":"git+https://github.com/cherow/cherow.git","type":"git"},"_npmVersion":"6.4.1","description":"Fast and lightweight, standard-compliant javascript parser written in ECMAScript","directories":{},"jsnext:main":"dist/cherow.esm.js","maintainers":[{"name":"fkleuver","email":"fred@avurad.nl"},{"name":"gplane","email":"g-plane@hotmail.com"},{"name":"kennyf","email":"kfrachelle123@gmail.com"}],"_nodeVersion":"10.12.0","contributors":[{"name":"Fred Kleuver","email":"https://github.com/fkleuver"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^13.1.0","path":"^0.12.7","husky":"^1.3.1","mocha":"^5.2.0","eslump":"^2.0.0","rimraf":"^2.6.3","rollup":"^1.1.0","tslint":"^5.12.1","test262":"git+https://github.com/tc39/test262.git#8ed9947df1c4ea34fa1810067529df0806cc07ad","ts-node":"^7.0.1","prettier":"^1.15.3","coveralls":"^3.0.2","cross-env":"^5.2.0","typescript":"^3.2.2","unexpected":"^10.40.2","@types/node":"^10.12.18","@types/mocha":"^5.2.5","clean-assert":"^2.0.0","test262-parser":"^2.0.7","tsconfig-paths":"^3.7.0","unicode-11.0.0":"^0.7.8","source-map-support":"^0.5.10","rollup-plugin-terser":"^4.0.2","rollup-plugin-replace":"^2.1.0","tslint-microsoft-contrib":"^6.0.0","rollup-plugin-typescript2":"^0.19.0"},"_npmOperationalInternal":{"tmp":"tmp/cherow_1.6.8-dev.20190119_1547856216879_0.4480596895585758","host":"s3://npm-registry-packages"},"_id":"cherow@1.6.8-dev.20190119","version":"1.6.8-dev.20190119"}