@panxl/omit
v0.0.7
Published
Utility function to create a shallow copy of an object which had dropped some fields.
Downloads
138
Readme
omit.js
Utility function to create a shallow copy of an object which had dropped some fields.
Usage
npm i --save @panxl/omit
var omit = require('@panxl/omit');
omit({ name: 'Benjy', age: 18 }, ['name']); // => { age: 18 }
API
omit(obj: Object, fields: string[]): Object
Return a shallow copy which had dropped fields.
License
MIT