Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
node.properties = node.properties.filter(function(prop) {
if (!prop.computed && (prop.kind === "get" || prop.kind === "set")) {
defineMap.push(mutatorMap, prop, null, file);
return false;
} else {
return true;
}
});
function pushToMap(node, enumerable, kind = "value", scope?) {
let mutatorMap;
if (node.static) {
setState({ hasStaticDescriptors: true });
mutatorMap = classState.staticMutatorMap;
} else {
setState({ hasInstanceDescriptors: true });
mutatorMap = classState.instanceMutatorMap;
}
const map = defineMap.push(mutatorMap, node, kind, classState.file, scope);
if (enumerable) {
map.enumerable = t.booleanLiteral(true);
}
return map;
}
node.properties = node.properties.filter(function(prop) {
if (!prop.computed && (prop.kind === "get" || prop.kind === "set")) {
defineMap.push(mutatorMap, prop, null, file);
return false;
} else {
return true;
}
});