{"bugs":{"url":"https://github.com/cherow/cherow/issues"},"dist":{"shasum":"bd75da04c4eccf9a7b98975252f5077eb152533d","tarball":"https://registry.npmjs.org/cherow/-/cherow-1.6.8-dev.20190504.tgz","fileCount":84,"integrity":"sha512-QEVGjQxz3zOnA1+0U06ehbr09CH8Y1SqDsTzMig2W77ofA45a/CJVIsN0tU9c84uC7CcNGTk2B7XugDHDcZvIQ==","signatures":[{"sig":"MEYCIQDDWRZv7o/SAnKu/aCtGSUwoGgLze8S04ApLSUyQg/6CAIhALHsHpwqHOdXoDxTS2Voh5s09ZH6JZ45q/THmS4v9luD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2162521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczNb5CRA9TVsSAnZWagAAcMMP/0AY1K6E0+nAL2jGgZZN\nyZ+Jv8+v6/k524Gs30b4psH/tUuaW23a9a9GFf/Hyzt7ehGWIrA8CipFECAF\nsP2dVmkTPTVuu+lxowMzIIill08OPoLf31iT6z/aDby90W/8XKHcISx7EjYG\n9X6x+4lJFbq1xFPNvixEtA+G6jsFbw7yZpZdBBwENj22WVbduMFFkG5x9SfS\njysz5a8nSmaaa7i4GsrpUiGCMeALtLensu3EjOQJjj0KA5bbvGg0UDWVaCGp\nQvrM2wVxf6WOaCXbtf6pqWMjPaIR3Cu2/MqMjFyNWGmM/QTYm++VjKt7UCud\nbrfSraWQQv54ty69WoGzD+CdNRNDKRUyjHurQXbykRoL8u+cptng8sIN81Af\n+CURroau0P/P0wHkzbS+fBnERo7t86C+xD3NExCFunyfBaYr+gHWcmjH8iAb\nenG//GfD2T/gqYml5/Zck7oIY7Yv3PiS4urLCUlHpeL+WoGqW9h1KITCH5Re\nNu9Rruh416WFrpZKr3/B/8y9YsPa74GtJE37ZQbjIBauHhKFTD37Cag34RLt\nxt1g5cir1nS6dsNw3d7BeTGK/q2dONC9hvqiyJE8n9fY+SBpsjeLBSbipOpK\nwdHyfD1CPal83pGxcC1x3QO+hZzxffMrlP9a/u7WYAbkeSG82kx0TCpCSKPv\nYU1Q\r\n=QP4q\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## Features\n\n* Conforms to the standard ECMAScript® 2020 [(ECMA-262 10th Edition)](https://tc39.github.io/ecma262/) language specification (*draft*)\n* Support stage 3 proposals via option.\n* Support for parsing with and without web compability (*AnnexB*)\n* Support to only parse [expressions](https://tc39.github.io/ecma262/#sec-ecmascript-language-expressions)\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 (~25 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 - ~72 KB minified\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* [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('foo = bar');\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\nThe API also allows you to use Cherow as a stand-alone  [expression parser](https://tc39.github.io/ecma262/#sec-ecmascript-language-expressions) and let you parse your code in either script or module goal code.\n\n```js\n\ncherow.parseExpression('foo', { ranges: true });\n\n```\n\nThis will return when serialized in json:\n\n```js\n {\n      end: 3,\n      name: 'foo',\n      start: 0,\n      type: 'Identifier'\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| `ranges`          | Append start and end offsets to each node |\n| `globalReturn`    | Allow return in the global scope |\n| `globalAwait`     | Allow await in the global scope |\n| `webcompat`       | Enable web compability (*AnnexB*) |\n| `impliedStrict`   | Enable strict mode initial enforcement |\n| `next`            | Enable stage 3 support (*ESNext*)  |\n| `experimental`    | Enable experimental features    |\n| `parenthesizedExpr` | Enable non-standard parenthesized expression node |\n| `raw`             | Attach raw property to each literal node and identifier node |\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## Experimental features\n\nCherow aim to support the same experimental features as found in V8 when enabling the 'experimental' flag. However. An exception has been made for the\n[numeric separators](https://github.com/tc39/proposal-numeric-separator) proposal. It's currently pending on Stage 2 after being \"*degraded*\" from Stage 3. The future of this proposal seems uncertain at the moment and will *not* be implemented.\n\nAlso the [proposal-decorators](https://github.com/tc39/proposal-decorators) are constantly changing so at current stage this will *not* be implemented.\n\n## Nightly builds\n\nIt's available on NPM.\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 tightly coupled to Babel, and is comparatively very slow.\n\nMost of these parsers would not fare any chance against the official Test262 suite, and 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":"41aba0ca3775a40453a8d5ed4c6a05988008e4d9","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","bundle:bench":"cross-env rimraf dist && node scripts/bundle.js bench","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-12.0.0":"^0.7.9","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.20190504_1556928248205_0.12839693568226762","host":"s3://npm-registry-packages"},"_id":"cherow@1.6.8-dev.20190504","version":"1.6.8-dev.20190504"}