omit-undefined

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

MIT 2 个版本
安装
npm install omit-undefined
yarn add omit-undefined
pnpm add omit-undefined
bun add omit-undefined
README

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.

版本列表
1.0.1 2021-05-31
1.0.0 2020-03-05