0.0.1 • Published 11 years ago
yiwn-compact v0.0.1
compact
Create and return clone of provided object by excluding null and undefined properties.
Installation
Using component
$ component install yiwn/compactUsing npm for browserify
$ npm install yiwn-compactUsage
Example:
var compact = require('yiwn-compact');
var obj = {
a: 0,
b: null,
c: 'Shakira'
};
var arr = [0, null, 'Shakira'];
compact(obj); // -> { a: 0, c: 'Sharkira' }
compact(obj); // -> [0, 'Shakira']Test
Run tests with mocha
$ make testLicense
The MIT License
0.0.1
11 years ago