{"name":"acorn-loose","description":"Error-tolerant ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn-loose.js","module":"dist/acorn-loose.mjs","exports":{"import":"./dist/acorn-loose.mjs","require":"./dist/acorn-loose.js"},"version":"8.0.0","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.0.0"},"maintainers":[{"email":"mail@adrianheine.de","name":"adrianheine"},{"email":"marijnh@gmail.com","name":"marijn"},{"email":"me@rreverser.com","name":"rreverser"}],"repository":{"type":"git","url":"git+https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:loose"},"license":"MIT","bugs":{"url":"https://github.com/acornjs/acorn/issues"},"_id":"acorn-loose@8.0.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.7","_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"dist":{"integrity":"sha512-YtQI8QdA6Tl8It5p0eRQCunnMM6ze3VnAAGcAxkzMpCNgI/crsSKp3QCdW5e5Soh4gyJ1Y2NQVk5WlP38KKWXQ==","shasum":"499830b2cb886528d8e85e03e02881b3e2781451","tarball":"http://registry-npm.ywwl.com/acorn-loose/download/acorn-loose-8.0.0.tgz","fileCount":8,"unpackedSize":306017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM+hjCRA9TVsSAnZWagAArDsP/0hYF5L4MpdoUYLyKcur\ncz/B+p7Uwm4pf1qmso3hREFvL4i1cf/bvVyIc92Ijqz/jyp+7QdZtdzm88V0\n0UBHGDjPexh5otA0oThLWFhgQkW+szgmy34QEAKmP24VvFwIRm+KgB+Hmkrt\nanyWYYPez6WB1QqIEZX00ZG053K8dijiIHAXdz/mtMqSNvT2UUpGWLFhc9XH\nfsWZD7J2/GEmSSHUv1MOvKaiFwhxAuRQ+kZ49AVdc5hIgTmeRiyjR+Ig9iaV\nB2/tZFzOrsl4s6rV3OH6ndaYFnBS/XvJQBH45wUvbuDpR1zvAu+l25JHJvuf\nbyiHBuAieaZPli/vGivfxiDW+K074x8GnXu4VVxpDn6W1uM9jRL5CGd/EPb0\nkWXoQOQT7+JOXsfHS86pFdZHb+lEq6c0+tQAAxAvQ+523V1oeBV53x+GGdED\nk0ADwqhdchc8w+5HOz/GORJU/ALp8ylNScC+9fmF6L+uce72rc1WTF+GxHYA\nIv1k+ZtYmQWDPft2pdBH7EM0AsPlB5LRGetf2whBc1u9cpi6StyU9vBPTSI+\nUqJePX8SO2HT5woF6cUR29gRsOeE3anMvXhDOKKbwaLlwGiuCJVe0mv2q8ny\nNs5J8Ca3UzWlprh1vhVW/gL70Jsj+4cBtCtkLYuAEY9LOWvRYGGhRmFIy9qY\nCmnm\r\n=9iqw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxfaqoWY2lzTFxUfFKVPgDN8EWzI/WD+Ue6ZPlDSLrAwIgCMYF+zDCgJiki1wL9q8FKMqF/nxYFFEAdosXGdr+V88="}],"size":57897,"noattachment":false,"key":"/acorn-loose/-/acorn-loose-8.0.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/acorn-loose_8.0.0_1597237346625_0.6676102054851367"},"_hasShrinkwrap":false,"readme":"# Acorn loose parser\n\nAn error-tolerant JavaScript parser written in JavaScript.\n\nThis parser will parse _any_ text into an\n[ESTree](https://github.com/estree/estree) syntax tree that is a\nreasonable approximation of what it might mean as a JavaScript\nprogram.\n\nIt will, to recover from missing brackets, treat whitespace as\nsignificant, which has the downside that it might mis-parse a valid\nbut weirdly indented file. It is recommended to always try a parse\nwith the regular `acorn` parser first, and only fall back to this\nparser when that one finds syntax errors.\n\n## Community\n\nAcorn is open source software released under an\n[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-loose/LICENSE).\n\nYou are welcome to [report\nbugs](https://github.com/acornjs/acorn/issues) or create pull requests\non [github](https://github.com/acornjs/acorn).\n\n## Installation\n\nThe easiest way to install acorn-loose is from [`npm`](https://www.npmjs.com/):\n\n```sh\nnpm install acorn-loose\n```\n\nAlternately, you can download the source and build acorn yourself:\n\n```sh\ngit clone https://github.com/acornjs/acorn.git\ncd acorn\nnpm install\n```\n\n## Interface\n\n**parse**`(input, options)` takes an input string and a set of options\n(the same options as\n[acorn](https://github.com/acornjs/acorn/blob/master/acorn/README.md)\ntakes), and returns a syntax tree, even if the code isn't\nsyntactically valid. It'll insert identifier nodes with name `\"✖\"` as\nplaceholders in places where it can't make sense of the input. Depends\non the `acorn` package, because it uses the same tokenizer.\n\n```javascript\nvar acornLoose = require(\"acorn-loose\");\nconsole.log(acornLoose.parse(\"1 / * 4 )[2]\", {ecmaVersion: 2020}));\n```\n\nLike the regular parser, the loose parser supports plugins. You can\ntake the **`LooseParser`** class exported by the module, and call its\nstatic `extend` method with one or more plugins to get a customized\nparser class. The class has a static `parse` method that acts like the\ntop-level `parse` method.\n\n**isDummy**`(node)` takes a `Node` and returns `true` if it is a dummy node\ninserted by the parser. The function performs a simple equality check on the\nnode's name.\n","publish_time":1597237346929,"_cnpm_publish_time":1597237346929,"dist-tags":{"latest":"8.5.2"}}