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

1.0.2 • Public • Published

omitNil

Creates an object composed of the own and inherited enumerable string keyed properties of object that doesn't null or undefined.

Usage: omitNil<T>(object: T): T

import { omitNil } from 'omit-nil'

omitNil({
  a: null,
  b: `Some value`,
  c: undefined,
  d: false
})
// Output: { b: 'Some value', d: false }

This module exported from utilizes project.

Package Sidebar

Install

npm i omit-nil

Weekly Downloads

10

Version

1.0.2

License

MIT

Unpacked Size

53.8 kB

Total Files

5

Last publish

Collaborators

  • natqe3