0.3.10 • Published 5 years ago

@queso/omit-keys v0.3.10

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@queso/omit-keys

npm license Travis Build Status codecov Try @queso/omit-keys on RunKit

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

npm

min + gzip | 122 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.

  • Note: This method is considerably slower than pick.

Usage

import omitKeys from '@queso/omit-keys'

const object = { a: 1, b: 2, c: 3 }

omitKeys(object, 'a', 'c')
// => { b: 2 }

Parameters

NameTypeDescription
objectTThe source object.
keys[K, ...K[]]The object keys to omit.

Type parameters

NameConstraint
Tobject
Kkeyof T

Returns

A new object with specified keys omitted.

Return type

Pick<T, Exclude<keyof T, K>>
0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.0

5 years ago