{"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","default":"./dist/acorn-loose.js"},"./dist/acorn-loose.js"],"./package.json":"./package.json"},"version":"8.3.0","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.5.0"},"maintainers":[{"name":"marijn","email":"marijnh@gmail.com"},{"name":"adrianheine","email":"mail@adrianheine.de"},{"name":"rreverser","email":"me@rreverser.com"}],"repository":{"type":"git","url":"git+https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:loose"},"license":"MIT","gitHead":"52e517f6743e711a459dd40c00f783f05bc041de","bugs":{"url":"https://github.com/acornjs/acorn/issues"},"_id":"acorn-loose@8.3.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-75lAs9H19ldmW+fAbyqHdjgdCrz0pWGXKmnqFoh8PyVd1L2RIb4RzYrSjmopeqv3E1G3/Pimu6GgLlrGbrkF7w==","shasum":"0cd62461d21dce4f069785f8d3de136d5525029a","tarball":"http://registry-npm.ywwl.com/acorn-loose/download/acorn-loose-8.3.0.tgz","fileCount":6,"unpackedSize":113845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyZcTCRA9TVsSAnZWagAACXMP/AypKKeyRrx6CC8trYQO\ng85sJKaEgGlWQYsiMYvAxR/RD7CNeYbitu+bQa1IayWHqOs/9OPQbNSLI5Tg\n3siSJSbhCWcblbWW7h8iIIYqdsnwcwTvwP87HjXrFmtAXhIw790bCuCf3wOZ\nZf+K/+XXsWS9n4PvL1aXaDBkPHGQ5kN1QJQCN0sVvugx4S+dTB10aZF0vszF\n2A5l8y5Jy/jVOSaTOzDAcBYIDnBKvNwj58//Tkt8Lhys2Mh2cDEwR6y02apQ\nAeaElZq3zSRprY/GfVvbkotrmz8R3qEHJgh2ANB0+nOV5qXlWJwwEH9QTntb\nhDuXDhX4wLal1qIT91wRTXKnMLHwqSE2W+ZStyO1VU8cgVdFA6huhtcFPVQU\n+12qG3tpJ3igtsIaVZzZEiuzpFGvS/dqLzCwUwo+actouYNNFjpeINZPRHFB\nfcwbAHmgEOi6FH4UEiSqSRBuK3sa6V+c1rFxevOGhBQTWLtts8MgzPsnelcj\nHFIxKBRZuXQCBO/iqHXMh8vmQjRr+3w9rwPMiMiQcUTxgVvJ49vicrT4ogws\nsxk6nmpjmRMQ3s09ZsWJJxikXNsuiMunHhW2b5xxh6pmIBZuV9hu0Usev/Xt\ni1cWlu29ZhHGvFpA9lP4O4qUgryGddw/hXHEiYqwXnTPWmffo2JHXm15zcJQ\nOmfR\r\n=c9iT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaOg6Pxffk56gXtwbEkgcJCaGtshVnPR+UuoG/19N/uQIgRyqvI7B7/iWOCqCi9jz5UCg+iyTmMNOUlYogijaU/Io="}],"size":23176,"noattachment":false,"key":"/acorn-loose/-/acorn-loose-8.3.0.tgz"},"_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/acorn-loose_8.3.0_1640601363458_0.5239520949312473"},"_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":1640601363622,"_cnpm_publish_time":1640601363622,"dist-tags":{"latest":"8.5.2"}}