lihai 8d6c751f49 feat: push | vor 2 Jahren | |
---|---|---|
.. | ||
README.md | vor 2 Jahren | |
index.js | vor 2 Jahren | |
package.json | vor 2 Jahren |
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