This package has been deprecated

Author message:

this package has been deprecated in favor of @queso/omit

@queso/omit-keys
TypeScript icon, indicating that this package has built-in type declarations

0.3.10 • Public • Published

@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

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

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @queso/omit-keys

      Weekly Downloads

      2

      Version

      0.3.10

      License

      MIT

      Unpacked Size

      10.6 kB

      Total Files

      8

      Last publish

      Collaborators

      • jedmao