lomit
v1.0.8
Published
Lightweight version of Object omit.
Downloads
19,024
Readme
lomit
Lightweight function for omitting properties from an object.
Install
Via npm
npm install --save lomit
Via Yarn
yarn add lomit
How to use
import { omit } from 'lomit';
omit({name: '', title: ''}, ['title']);
Output: {name: ''}
Deep omits (New!)
import { omit } from 'lomit';
omit({name: '', title: '', location: { city: '', state: '' }}, ['title', 'location.city']);
Output: {name: '', location: { state: '' }}