1
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = omit;
|
||||
function omit(obj, fields) {
|
||||
const clone = Object.assign({}, obj);
|
||||
if (Array.isArray(fields)) {
|
||||
fields.forEach(key => {
|
||||
delete clone[key];
|
||||
});
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
Reference in New Issue
Block a user