Socket
Socket
Sign inDemoInstall

@babel/helper-annotate-as-pure

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-annotate-as-pure - npm Package Compare versions

Comparing version 7.18.6 to 7.21.4-esm

lib/index.js.map

10

lib/index.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc