mirror of
https://github.com/wu736139669/Monkey-Test.git
synced 2026-08-05 05:55:46 +00:00
26 lines
531 B
JavaScript
26 lines
531 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
exports["default"] = function (_ref) {
|
|
var Plugin = _ref.Plugin;
|
|
var t = _ref.types;
|
|
|
|
return new Plugin("undefined-to-void", {
|
|
metadata: {
|
|
group: "builtin-basic"
|
|
},
|
|
|
|
visitor: {
|
|
ReferencedIdentifier: function ReferencedIdentifier(node, parent) {
|
|
if (node.name === "undefined") {
|
|
return t.unaryExpression("void", t.literal(0), true);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|
|
module.exports = exports["default"]; |