lomit
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i lomit

Weekly Downloads

5,470

Version

1.0.8

License

MIT

Unpacked Size

13.7 kB

Total Files

12

Last publish

Collaborators

  • ryanhefner