Sha256: cc57623ab3a5b3117a7fd031d73b156619fe9183406719b15204f25cf2d9bcd7

Contents?: true

Size: 574 Bytes

Versions: 14

Compression:

Stored size: 574 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = annotateAsPure;
var _t = require("@babel/types");
const {
  addComment
} = _t;
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);
}

//# sourceMappingURL=index.js.map

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.50 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.49 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.47 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.46 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.45 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.44 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.43 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.42 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.41 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.40 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.39 node_modules/@babel/helper-annotate-as-pure/lib/index.js
immosquare-cleaner-0.1.38 node_modules/@babel/helper-annotate-as-pure/lib/index.js