1.0.8 • Published 3 years ago

lomit v1.0.8

Weekly downloads
1,844
License
MIT
Repository
github
Last release
3 years ago

lomit

npm NPM npm Coveralls github CircleCI Snyk Vulnerabilities for GitHub Repo

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: '' }}

License

MIT © Ryan Hefner