cleanr

Recursively clean objects

Usage no npm install needed!

<script type="module">
  import cleanr from 'https://cdn.skypack.dev/cleanr';
</script>

README

Cleanr

Installation

npm install [--save] cleanr

Usage

const clean = require('cleanr');

const object = {...}

console.log(clean(object));

This will log object without the empty parameters to the console.

What is empty

  • {}
  • []
  • '' & ' '
  • undefined

License

MIT