1.0.0 • Published 5 years ago

@uzelux/json v1.0.0

Weekly downloads
20
License
ISC
Repository
gitlab
Last release
5 years ago

JSON Plus

An extension to the build-in JSON object


USAGE

require('@uzelux/json');

Clean

This is to remove all undefined values within the JSON

JSON.clean({a: 'value', b: undefined, c: null, d: '', e: [], f: {}});
// {a: 'value', c: null, d: '', e: [], f: {}}

Purge

This is to remove all empty values (null, empty string, empty array, zero property object)

JSON.clean({a: 'value', b: undefined, c: null, d: '', e: [], f: {}});
// {a: 'value'}
1.0.0

5 years ago

0.0.1

5 years ago