luis c7750ca5f1 ready to start? | 5 lat temu | |
---|---|---|
.. | ||
README.md | 5 lat temu | |
index.js | 5 lat temu | |
package.json | 5 lat temu |
Turn anything into an array
$ npm install --save array-ify
var 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