Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
obj.push({ key: key, value: value });
};
if (args) {
for (let arg of args) {
obj.__setitem__(arg[0], arg[1]);
}
}
return obj;
};
functionTable['__builtin__.bytearray'] = function(data, encoding) {
return { data: data, encoding: encoding };
};
functionTable['builtins.bytearray'] = function(data) {
return { data: data };
};
functionTable['builtins.slice'] = function(start, stop, step) {
return { start: start, stop: stop, step: step };
}
functionTable['cloudpickle.cloudpickle._builtin_type'] = function(name) {
return name;
}
let unknownNameMap = new Set();
let knownPackageMap = new Set([
'sklearn', 'collections', '__builtin__', 'builtins',
'copy_reg', 'joblib','xgboost', 'lightgbm', 'gensim', 'numpy'
]);
let function_call = (name, args) => {
let func = functionTable[name];
if (func) {
return func.apply(null, args);