{"name":"meriyah","version":"4.1.5-dev.20210526","keywords":["parsing","ecmascript","javascript","parser","performance","estree","es2018","es2019","es2020","es2021","esnext","lexer","ast","lightweight"],"author":{"url":"https://github.com/KFlash","name":"Kenny F."},"license":"ISC","_id":"meriyah@4.1.5-dev.20210526","maintainers":[{"name":"huochunpeng","email":"huochunpeng@gmail.com"},{"name":"weiran.zsd","email":"weiran.zsd@outlook.com"},{"name":"meriyah","email":"klechon123@gmail.com"}],"contributors":[{"url":"https://github.com/3cp","name":"Chunpeng Huo"}],"homepage":"https://github.com/meriyah/meriyah","bugs":{"url":"https://github.com/meriyah/meriyah/issues"},"dist":{"shasum":"f69097f449625b9699dab5bcd07f88352bcd0ca8","tarball":"http://registry-npm.ywwl.com/meriyah/download/meriyah-4.1.5-dev.20210526.tgz","fileCount":82,"integrity":"sha512-LQrZo6PYX3iCnvJhA08RIedUiqSFfRKF8HcmB+r0ObZ1w/pO9j20CF6gcvOzD0Cf2aEbPvLO4beEFXOrkOK0bA==","signatures":[{"sig":"MEQCIF1kGP4zJOCaX1YACQB9rzHmw11Z0OgTt+q8i6zO9SA+AiBEArDF3KRtoAhIRKXwzsdvRlkff1hM1Z+pfTSI2rnq7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4956329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrZIvCRA9TVsSAnZWagAAlfgP/jKAAv3ZIWPGSHqM0/Gb\nrByng4FZzin9bsgAJSu8meZF692shF2K/PDSHEfOFQ6jTFiiR/2Pm35bb1Z0\nw8Wm6fbVKiRtO73A2Bvu2rmfQYM3sS0PI0eHL3U0DBfd0+rXf4g04UA73mBD\nn9umE/URO/kRgQ4VZGsxJhWZGYlGKICwKZTTmYeJ0mCqAkf0GFlGIg+R9Akh\n7RvVU/NDJ8XmK6STNG5OsMPZ1tMJf/RbqvKuCKZFH0i4JTtN3ETbzRMUnjI/\nqjCNPSltZyidL8NdW1cofyN42A5QsTMTkvXxbUT+Z+TxIpyX3k+wMUgHEKYU\nRwl8N4oOx1f6j/346dUMznpiqSXrQvZJJ/okIZvu+oemdofSZO3Rm6JkAXUj\ndFl4PeLwue9e9ZXTqyUMEv7O5KPGV8G7bZf9XRHNbn31tjRd5tQVBVN1B4VZ\n8JYAUaPwEzHKZaGbVvwKijLGBamxXcf5MjqSH4CU7nof+qlORra9a7BXyWj1\n1lsHJOyPBQ1buJPPU/YCuz5U0+Gsu4Uid+Foj79iytSkz87seLF3mBmr0mBz\nLm5YaX8/wu5kLvf11jlfJ8uuEoV9DO6sta8CeKgR/ZOz4IR8Rl1mKAkv0eCe\nOBJtI//9H7/qCEvkzDhfyjJ+Ns6aa3XQuPj8Ze62yXNbenh38tOKpCv+1eFK\nnzmb\r\n=OiV/\r\n-----END PGP SIGNATURE-----\r\n","size":981182,"noattachment":false,"key":"/meriyah/-/meriyah-4.1.5-dev.20210526.tgz"},"main":"dist/meriyah.cjs","type":"module","husky":{"hooks":{"pre-commit":"node ./scripts/prettier.js check-changed"}},"types":"dist/src/meriyah.d.ts","unpkg":"dist/meriyah.umd.min.js","module":"dist/meriyah.esm.js","readme":"<h1 align=\"center\">Meriyah</h1>\n\n<p align=\"center\"> 100% compliant, self-hosted javascript parser with high focus on both performance and stability. Stable and already used in production.</p>\n\n<p align=\"center\">\n    <a href=\"https://www.npmjs.com/package/meriyah\"><img src=\"https://img.shields.io/npm/v/meriyah.svg?style=flat-square\" alt=\"Meriyah NPM\"/></a>\n    <a href=\"https://lgtm.com/projects/g/meriyah/meriyah/context:javascript\"><img src=\"https://img.shields.io/lgtm/grade/javascript/g/meriyah/meriyah.svg?logo=lgtm&logoWidth=18\" alt=\"GitHub license\" /></a>\n    <a href=\"https://lgtm.com/projects/g/meriyah/meriyah/alerts\"><img src=\"https://img.shields.io/lgtm/alerts/g/meriyah/meriyah.svg?logo=lgtm&logoWidth=18\" alt=\"Total alerts\" /></a>\n    <a href=\"https://circleci.com/gh/meriyah/meriyah\"><img src=\"https://circleci.com/gh/meriyah/meriyah.svg?style=svg\" alt=\"Circle\" /></a>\n    <a href=\"https://github.com/meriyah/meriyah/blob/master/LICENSE.md\"><img src=\"https://img.shields.io/github/license/meriyah/meriyah.svg\" alt=\"License\" /></a>\n\n</p>\n\n<br>\n\n## [Demo](https://meriyah.github.io/meriyah)\n\n## Features\n\n* Conforms to the standard ECMAScript® 2021 (ECMA-262 11th Edition) language specification\n* Support TC39 proposals via option\n* Support for additional ECMAScript features for Web Browsers\n* JSX support via option\n* Optionally track syntactic node locations\n* Emits an ESTree-compatible abstract syntax tree.\n* No backtracking\n* Low memory usage\n* Very well tested (~99 000 unit tests with full code coverage)\n* Lightweight - ~90 KB minified\n\n## ESNext features\n\n* [Decorators](https://github.com/tc39/proposal-decorators)\n* [Class Public Instance Fields & Private Instance Fields](https://github.com/tc39/proposal-class-fields)\n* [Hashbang grammar](https://github.com/tc39/proposal-hashbang)\n* [Private methods](https://github.com/tc39/proposal-private-methods)\n* [Static class fields and private static methods](https://github.com/tc39/proposal-static-class-features/)\n\n**Note:** These features need to be enabled with the `next` option.\n\n## Installation\n\n```sh\nnpm install meriyah --save-dev\n```\n\n## API\n\nMeriyah 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](https://tc39.github.io/ecma262/index.html#sec-ecmascript-language-scripts-and-modules).\n\nThe `parse` method exposed by meriyah takes an optional `options` object which allows you to specify whether to parse in [`script`](https://tc39.github.io/ecma262/#sec-parse-script) mode (the default) or in [`module`](https://tc39.github.io/ecma262/#sec-parsemodule) mode.\n\nThis is the available options:\n\n```js\n{\n  // The flag to allow module code\n  module: false;\n\n  // The flag to enable stage 3 support (ESNext)\n  next: false;\n\n  // The flag to enable start, end offsets and range: [start, end] to each node\n  ranges: false;\n\n  // Enable web compatibility\n  webcompat: false;\n\n  // The flag to enable line/column location information to each node\n  loc: false;\n\n  // The flag to attach raw property to each literal and identifier node\n  raw: false;\n\n  // Enabled directives\n  directives: false;\n\n  // The flag to allow return in the global scope\n  globalReturn: false;\n\n  // The flag to enable implied strict mode\n  impliedStrict: false;\n\n  // Allows comment extraction. Accepts either a function or array\n  onComment: []\n\n  // Allows token extraction. Accepts either a function or array\n  onToken: []\n\n  // Enable non-standard parenthesized expression node\n  preserveParens: false;\n\n  // Enable lexical binding and scope tracking\n  lexical: false;\n\n  // Adds a source attribute in every node’s loc object when the locations option is `true`\n  source: false;\n\n  // Distinguish Identifier from IdentifierPattern\n  identifierPattern: false;\n\n   // Enable React JSX parsing\n  jsx: false\n\n  // Allow edge cases that deviate from the spec\n  specDeviation: false\n}\n\n```\n\n### onComment and onToken\nIf an array is supplied, comments/tokens will be pushed to the array, the item in the array contains `start/end/range` information when ranges flag is true, it will also contain `loc` information when loc flag is true.\n\nIf a function callback is supplied, the signature must be\n\n```ts\nfunction onComment(type: string, value: string, start: number, end: number, loc: SourceLocation): void {}\n\nfunction onToken(token: string, start: number, end: number, loc: SourceLocation): void {}\n```\n\nNote the `start/end/loc` information are provided to the function callback regardless of the settings on ranges and loc flags. onComment callback has one extra argument `value: string` for the body string of the comment.\n\n## Example usage\n\n```js\n\nimport { parseScript } from './meriyah';\n\nparseScript('({x: [y] = 0} = 1)');\n\n```\n\nThis will return when serialized in json:\n\n```js\n{\n    type: \"Program\",\n    sourceType: \"script\",\n    body: [\n        {\n            type: \"ExpressionStatement\",\n            expression: {\n                type: \"AssignmentExpression\",\n                left: {\n                    type: \"ObjectPattern\",\n                    properties: [\n                        {\n                            type: \"Property\",\n                            key: {\n                                type: \"Identifier\",\n                                name: \"x\"\n                            },\n                            value: {\n                                type: \"AssignmentPattern\",\n                                left: {\n                                    type: \"ArrayPattern\",\n                                    elements: [\n                                        {\n                                            \"type\": \"Identifier\",\n                                            \"name\": \"y\"\n                                        }\n                                    ]\n                                },\n                                right: {\n                                    type: \"Literal\",\n                                    value: 0\n                                }\n                            },\n                            kind: \"init\",\n                            computed: false,\n                            method: false,\n                            shorthand: false\n                        }\n                    ]\n                },\n                operator: \"=\",\n                right: {\n                    type: \"Literal\",\n                    value: 1\n                }\n            }\n        }\n    ]\n}\n```\n","browser":"dist/meriyah.umd.min.js","engines":{"node":">=10.4.0"},"exports":{"import":"./dist/meriyah.esm.js","require":"./dist/meriyah.cjs"},"gitHead":"1e9a59c5338ac18767abc4043f28a9e879ac717a","scripts":{"lint":"eslint \"{src,test}/**/*.{ts,js}\"","test":"mocha \"test/**/*.ts\"","build":"tsc","bundle":"cross-env rimraf dist && node scripts/bundle.js","version":"standard-changelog && git add CHANGELOG.md","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","preversion":"npm test","test:watch":"npm run test -- --watch --watch-extensions ts","build:watch":"tsc -w","postversion":"git push && git push --tags && npm publish","test-single":"mocha","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","prepublishOnly":"npm run bundle","prepare-nightly":"node scripts/bump-dev-version","test:watch:verbose":"npm run test:watch -- -R spec"},"typings":"dist/src/meriyah.d.ts","_npmUser":{"name":"meriyah","email":"klechon123@gmail.com"},"repository":{"url":"git+https://github.com/meriyah/meriyah.git","type":"git"},"_npmVersion":"6.14.12","description":"A 100% compliant, self-hosted javascript parser with high focus on both performance and stability","directories":{},"jsnext:main":"dist/meriyah.esm.js","_nodeVersion":"14.16.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^15.1.0","glob":"^7.1.6","path":"^0.12.7","chalk":"^4.1.0","husky":"^4.3.7","mocha":"^8.2.1","tslib":"^2.1.0","eslint":"^7.17.0","rimraf":"^3.0.2","rollup":"^2.38.1","ts-node":"^9.1.1","prettier":"^2.2.1","coveralls":"^3.1.0","cross-env":"^7.0.3","typescript":"^4.1.3","unexpected":"^12.0.0","@types/node":"^14.14.21","@types/mocha":"^8.2.0","tsconfig-paths":"^3.9.0","unicode-13.0.0":"^0.8.0","eslint-plugin-node":"^11.1.0","source-map-support":"^0.5.19","standard-changelog":"^2.0.27","@rollup/plugin-json":"^4.1.0","eslint-plugin-import":"^2.22.1","rollup-plugin-terser":"^7.0.2","test262-parser-tests":"0.0.5","@typescript-eslint/parser":"^4.13.0","rollup-plugin-typescript2":"^0.30.0","@typescript-eslint/eslint-plugin":"^4.13.0"},"_npmOperationalInternal":{"tmp":"tmp/meriyah_4.1.5-dev.20210526_1621987886934_0.8009109198266884","host":"s3://npm-registry-packages"},"publish_time":1621987887102,"_cnpm_publish_time":1621987887102,"dist-tags":{"dev":"4.1.5-dev.20210526","latest":"7.4.1"}}