- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
24 lines
571 B
JavaScript
24 lines
571 B
JavaScript
"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
|