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;
}
});
path.replaceWith(
t.callExpression(
t.memberExpression(
t.identifier("Object"),
t.identifier("defineProperties"),
),
[node, defineMap.toDefineObject(mutatorMap)],
),
);
},
},
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;
}
});
path.replaceWith(
t.callExpression(
t.memberExpression(
t.identifier("Object"),
t.identifier("defineProperties"),
),
[node, defineMap.toDefineObject(mutatorMap)],
),
);
},
},