{"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.0.2","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.0.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","bugs":{"url":"https://github.com/acornjs/acorn/issues"},"_id":"acorn-loose@8.0.2","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-h25FYjJONkLfEq0PWMax9p2Xjhj6Ex9aiOhwayUxT8R5alTt1+00xypWLxUBu7kASwiNTzjmq6ohOY6EdsVbVw==","shasum":"a158e721c3cf7845d7d646465df89fb708292b14","tarball":"http://registry-npm.ywwl.com/acorn-loose/download/acorn-loose-8.0.2.tgz","fileCount":8,"unpackedSize":326249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDnYzCRA9TVsSAnZWagAAk/MP/RtsbBxS9Knq56Ke/A1M\n7VBcDD1s/H3VB1l3nO5y6VbaycYTasZFybbort2nq67SXLAZm42J6kIsXfoN\nx6qnat6xZB1FzEdN/vA1Idas2Ytqiq8wLN2L1LyciH732X0/2EZ2gAM2P3Fi\naS2hZpYSzL/vsIHsBNZqZHg+rAjw1dCgPbvaLcOfmLl05lLa2tX+O1lCm+FW\nWROVmVhx5OgNp5MpW4idS9eXjXSBjyPlg7GRWobLTF8zbe89rFbZbSz5L/bv\nQkH07XegUzk3vRdQjwx0zy9bloJ0FeRIiJA6Nl0EFyCQnjnaYwd3TwUh/rcX\nHV9Wn83cPtyXXisYxNXvwZe3hvcslsM7f/EZX5Cm416tJuJDiT+EReehU7Xn\nGpCMyUqH0OyHrrAt57X+UIcQLnS4sKXnM6WvcmW0xYk6uL8iyb4zeU+DbqGk\nr7h1Bn5JlewlA4qzXJkMbtYO4gtH5kgDmCdkURCKbx6JceGdLQzntHJVE6HT\nRk13O5/4VgAe0ioUffw4artTKvTlvG0k3NWWRwgL+pu6VojpbvNqoS9PwyFA\nAQ65MYzI/RkRVVulv3DTblYRktMW9omblN/Qg9k78Vw5T4Tm2pfFhflb3kxd\nH4/sQrU7HZhKRZWysemEaqzLpiIVq7NVQjNgJsegOEQBNHn5RhXk4FIKK4vq\nR1Pb\r\n=3tye\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDpfpSGgr/mOSQhMSA3rsMs+iLuKZxjaQHpC0rEydPOKAiAWzjp/PC7Mr6AwXnn5zDyyoGCkFk5EcppbsbeoRVAAZA=="}],"size":59266,"noattachment":false,"key":"/acorn-loose/-/acorn-loose-8.0.2.tgz"},"_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/acorn-loose_8.0.2_1611560499121_0.540479017408366"},"_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":1611560499266,"_cnpm_publish_time":1611560499266,"dist-tags":{"latest":"8.5.2"}}