JSPM

@queso/omit

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q13580F
  • License MIT

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

Package Exports

  • @queso/omit

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@queso/omit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@queso/omit

npm license Travis Build Status codecov Try @queso/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 '@queso/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>