{"_id":"babel-helper-annotate-as-pure","_rev":"2-680e52f23737dd857e3f74b7bc283112","name":"babel-helper-annotate-as-pure","description":"Helper function to annotate paths and nodes with #__PURE__ comment","dist-tags":{"next":"7.0.0-beta.3","latest":"7.0.0-beta.2"},"versions":{"7.0.0-beta.2":{"name":"babel-helper-annotate-as-pure","version":"7.0.0-beta.2","description":"Helper function to annotate paths and nodes with #__PURE__ comment","repository":{"type":"git","url":"https://github.com/babel/babel/tree/master/packages/babel-helper-annotate-as-pure"},"license":"MIT","main":"lib/index.js","dependencies":{"babel-types":"7.0.0-beta.2"},"_id":"babel-helper-annotate-as-pure@7.0.0-beta.2","_npmVersion":"5.4.1","_nodeVersion":"8.1.4","_npmUser":{"name":"hzoo","email":"hi@henryzoo.com"},"dist":{"integrity":"sha512-ALMJxf+quNt+4Bbj2N1f3QHhplJT3yp2UXjwpha0c4s9NBMsiStegqckB4/MrA3DeKsiSR7GATGQYA3MI1qpNw==","shasum":"e41c37c53202305fc9829cdd407487f14f7d5c99","tarball":"https://registry.npmjs.org/babel-helper-annotate-as-pure/-/babel-helper-annotate-as-pure-7.0.0-beta.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtKqu9K48OmAolq6aK3CS4wG4d96YHv0wuYBi/JDnfswIhAKeQzmq/tg2LMc1mSCiNja/uD/QuAs21vqTNGNrwug9E"}]},"maintainers":[{"name":"hzoo","email":"hi@henryzoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-annotate-as-pure-7.0.0-beta.2.tgz_1506438919854_0.8532285050023347"}},"7.0.0-beta.3":{"name":"babel-helper-annotate-as-pure","version":"7.0.0-beta.3","description":"Helper function to annotate paths and nodes with #__PURE__ comment","repository":{"type":"git","url":"https://github.com/babel/babel/tree/master/packages/babel-helper-annotate-as-pure"},"license":"MIT","main":"lib/index.js","dependencies":{"babel-types":"7.0.0-beta.3"},"_id":"babel-helper-annotate-as-pure@7.0.0-beta.3","_npmVersion":"5.5.1","_nodeVersion":"8.1.4","_npmUser":{"name":"hzoo","email":"hi@henryzoo.com"},"dist":{"integrity":"sha512-C6uYc7RmuPDZmkwTaV/ya0BGuZJFyuU/mAyDDqSfyuUZavk04eKdEWxjaKRGd3UA/fpzLNKViYO4aQgY4TsxCQ==","shasum":"f86e3f15b48c1f8df1669d890548ad6f7ca252d6","tarball":"https://registry.npmjs.org/babel-helper-annotate-as-pure/-/babel-helper-annotate-as-pure-7.0.0-beta.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBiCVmBF5al0GQtmYgC7OGIN9ghH9OlwiPkl3O5YdLgQIhAPfJs7rk1SztLaR7lGunANGMbFpKU2w818cqFD3mxhSl"}]},"maintainers":[{"name":"hzoo","email":"hi@henryzoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-annotate-as-pure-7.0.0-beta.3.tgz_1508073104132_0.8318020454607904"}}},"readme":"# babel-helper-annotate-as-pure\n\n## API\n\n```js\ndeclare export default annotateAsPure(nodeOrPath: Node | NodePath);\n```\n\n## Usage\n\n```js\nimport traverse from \"babel-traverse\";\nimport annotateAsPure from \"babel-helper-annotate-as-pure\";\n\n// ...\n\ntraverse(file, {\n  CallExpression(path) {\n    annotateAsPure(path);\n  },\n});\n```\n\n## Caveat with UglifyJS pre v3.1.0\n\n`babel-helper-annotate-as-pure` will append any existing leading comments to the `#__PURE__` annotation. Versions of UglifyJS prior to v3.1.0 will **ignore** these annotations, as they only check the _last_ leading comment for the annotation.\n\nFor example, using the `Usage` snippet above:\n\n**In**\n\n```js\nconst four = /* foo */ add(2, 2);\n```\n\n**Out**\n\n```js\nconst four = /* #__PURE__ */ /* foo */ add(2, 2);\n```\n","maintainers":[{"name":"hzoo","email":"hi@henryzoo.com"}],"time":{"modified":"2022-04-11T16:34:17.666Z","created":"2017-09-26T15:15:20.783Z","7.0.0-beta.2":"2017-09-26T15:15:20.783Z","7.0.0-beta.3":"2017-10-15T13:11:45.072Z"},"repository":{"type":"git","url":"https://github.com/babel/babel/tree/master/packages/babel-helper-annotate-as-pure"},"license":"MIT","readmeFilename":"README.md"}