@lavadrop/omit
The opposite of @lavadrop/pick; this method creates an object composed of the object's own properties that are not in the list of omitted keys.
Last updated 2 years ago by jedmao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lavadrop/omit 
SYNC missed versions from official npm registry.

@lavadrop/omit

npm license Travis Build Status codecov Try @lavadrop/omit on RunKit

Part of a library of zero-dependency npm modules that do just one thing.

npm

min + gzip | 114 bytes

source

The opposite of pick; this method creates an object composed of the object's own properties that are not in the list of omitted keys.

Usage

import omit from '@lavadrop/omit'

const obj = { a: 1, b: 2, c: 3 }
omit(obj, 'a', 'c')
// => { b: 2 }

Parameters

Name Type Description
object T The source object.
keys [K, ...K[]] The object keys to omit.

Type parameters

Name Constraint
T object
K keyof T

Returns

A new object with specified keys omitted.

Return type

Omit<T, K>

Current Tags

  • 0.4.0                                ...           latest (2 years ago)

2 Versions

  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 75
Today 0
This Week 2
This Month 6
Last Day 0
Last Week 4
Last Month 6
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2021 © npmmirror.com |