source: imaps-frontend/node_modules/@babel/helper-annotate-as-pure/lib/index.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 574 bytes
RevLine 
[79a0317]1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = annotateAsPure;
7var _t = require("@babel/types");
8const {
9 addComment
10} = _t;
11const PURE_ANNOTATION = "#__PURE__";
12const isPureAnnotated = ({
13 leadingComments
14}) => !!leadingComments && leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));
15function annotateAsPure(pathOrNode) {
16 const node = pathOrNode["node"] || pathOrNode;
17 if (isPureAnnotated(node)) {
18 return;
19 }
20 addComment(node, "leading", PURE_ANNOTATION);
21}
22
23//# sourceMappingURL=index.js.map
Note: See TracBrowser for help on using the repository browser.