omit-undefined

v1.0.0
Creates an object composed of the own and inherited enumerable string keyed properties of object that doesn't undefined.
utilizes util omit undefined omit-undefined undefined-omit

omitUndefined

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

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

import { omitUndefined } from 'omit-undefined'

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

This module exported from utilizes project.

Metadata

  • MIT
  • Whatever
  • Natan Farkash
  • released 3/5/2020

Downloads

Maintainers