without-undefined-properties
v0.1.2
Published
Copies an object without its undefined properties. 🫥
Downloads
40,934
Readme
Usage
npm i without-undefined-propertiesTwo functions are exported:
withoutUndefinedProperties: Copies all of an object's properties except those that areundefinedwithoutUndefinedPropertiesDeep: Copies all of an object's properties except those that areundefined, recursively
withoutUndefinedProperties
import { withoutUndefinedProperties } from "without-undefined-properties";
// { a: true }
withoutUndefinedProperties({ a: true, b: undefined });withoutUndefinedPropertiesDeep
import { withoutUndefinedPropertiesDeep } from "without-undefined-properties";
// { a: true, b: { c: false } }
withoutUndefinedPropertiesDeep({ a: true, b: { c: false, d: undefined } });Development
See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md.
Thanks! 🫥
Contributors
💝 This package was templated with
create-typescript-appusing the Bingo engine.
