1
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
export default 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