@babel/helper-annotate-as-pure
Advanced tools
Comparing version 7.18.6 to 7.21.4-esm
@@ -7,5 +7,3 @@ "use strict"; | ||
exports.default = annotateAsPure; | ||
var _t = require("@babel/types"); | ||
const { | ||
@@ -15,15 +13,13 @@ addComment | ||
const PURE_ANNOTATION = "#__PURE__"; | ||
const isPureAnnotated = ({ | ||
leadingComments | ||
}) => !!leadingComments && leadingComments.some(comment => /[@#]__PURE__/.test(comment.value)); | ||
function annotateAsPure(pathOrNode) { | ||
const node = pathOrNode["node"] || pathOrNode; | ||
if (isPureAnnotated(node)) { | ||
return; | ||
} | ||
addComment(node, "leading", PURE_ANNOTATION); | ||
} | ||
addComment(node, "leading", PURE_ANNOTATION); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/helper-annotate-as-pure", | ||
"version": "7.18.6", | ||
"version": "7.21.4-esm", | ||
"description": "Helper function to annotate paths and nodes with #__PURE__ comment", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/types": "^7.18.6" | ||
"@babel/types": "^7.21.4-esm" | ||
}, | ||
@@ -20,0 +20,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4046
6
21
1
Updated@babel/types@^7.21.4-esm