Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikeibberson/clean-object

Helper function for recursively removing undefined values
https://github.com/mikeibberson/clean-object

Last synced: 4 days ago
JSON representation

Helper function for recursively removing undefined values

Awesome Lists containing this project

README

        

# clean-object

This is a no-dependency helper function that recurses an object and drops its
undefined values.

```javascript
const clean = require("clean-object-helper");

const output = clean({
foo: 1,
bar: 2,
quuz: undefined,
});

// dropped quuz
console.log(output);
```