You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@babel/helper-annotate-as-pure

Package Overview
Dependencies
Maintainers
6
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.42 to 7.0.0-beta.43

29

lib/index.js
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = annotateAsPure;
var t = _interopRequireWildcard(require("@babel/types"));
function t() {
const data = _interopRequireWildcard(require("@babel/types"));
t = function () {
return data;
};
return data;
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
var PURE_ANNOTATION = "#__PURE__";
const PURE_ANNOTATION = "#__PURE__";
var isPureAnnotated = function isPureAnnotated(_ref) {
var leadingComments = _ref.leadingComments;
return !!leadingComments && leadingComments.some(function (comment) {
return /[@#]__PURE__/.test(comment.value);
});
};
const isPureAnnotated = ({
leadingComments
}) => !!leadingComments && leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));
function annotateAsPure(pathOrNode) {
var node = pathOrNode.node || pathOrNode;
const node = pathOrNode.node || pathOrNode;

@@ -26,3 +33,3 @@ if (isPureAnnotated(node)) {

t.addComment(node, "leading", PURE_ANNOTATION);
t().addComment(node, "leading", PURE_ANNOTATION);
}
{
"name": "@babel/helper-annotate-as-pure",
"version": "7.0.0-beta.42",
"version": "7.0.0-beta.43",
"description": "Helper function to annotate paths and nodes with #__PURE__ comment",

@@ -9,4 +9,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-annotate-as-pure",

"dependencies": {
"@babel/types": "7.0.0-beta.42"
"@babel/types": "7.0.0-beta.43"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc