package
Turn anything into an array
npm install array-ifyGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Turn anything into an array
$ npm install --save array-ifyvar arrayify = require('array-ify');
arrayify('unicorn');
//=> ['unicorn']
arrayify(['unicorn']);
//=> ['unicorn']
arrayify(null);
//=> [null]
arrayify(undefined);
//=> [undefined]The difference that is this module does NOT turn null or undefined to an empty array.
MIT © Steve Mao