| Server IP : 74.208.250.37 / Your IP : 216.73.216.233 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : miferval ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/nodejs/@babel/plugin-transform-property-mutators/lib/ |
Upload File : |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.pushAccessor = pushAccessor;
exports.toDefineObject = toDefineObject;
var _core = require("@babel/core");
function pushAccessor(mutatorMap, node) {
var _mutatorMap$alias;
const alias = _core.types.toKeyAlias(node);
const map = (_mutatorMap$alias = mutatorMap[alias]) != null ? _mutatorMap$alias : mutatorMap[alias] = {
_inherits: [],
_key: node.key
};
map._inherits.push(node);
const value = _core.types.functionExpression(null, node.params, node.body, node.generator, node.async);
value.returnType = node.returnType;
_core.types.inheritsComments(value, node);
map[node.kind] = value;
return map;
}
function toDefineObject(mutatorMap) {
const objExpr = _core.types.objectExpression([]);
Object.keys(mutatorMap).forEach(function (mutatorMapKey) {
const map = mutatorMap[mutatorMapKey];
map.configurable = _core.types.booleanLiteral(true);
map.enumerable = _core.types.booleanLiteral(true);
const mapNode = _core.types.objectExpression([]);
const propNode = _core.types.objectProperty(map._key, mapNode, map._computed);
Object.keys(map).forEach(function (key) {
const node = map[key];
if (key[0] === "_") return;
const prop = _core.types.objectProperty(_core.types.identifier(key), node);
_core.types.inheritsComments(prop, node);
_core.types.removeComments(node);
mapNode.properties.push(prop);
});
objExpr.properties.push(propNode);
});
return objExpr;
}
//# sourceMappingURL=define-map.js.map