arrayify-compact
Similar to Lo-Dash's compact method, but coerces values to arrays first, then returns a flattened array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are all falsey.
Install
Install with npm:
npm i arrayify-compact --save-dev
Usage
var arrayify = require('arrayify-compact');
console.log(arrayify('a'));
console.log(arrayify(['a', 'b', ['c', ['d']]]));
console.log(arrayify(['a', 'b', ['c', ['d'], null, false, 0, NaN, '', [], undefined]]));
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on July 06, 2014.