Repository URL to install this package:
|
Version:
0.6.0 ▾
|
gateway-proxy
/
usr
/
share
/
gateway-proxy
/
app
/
node_modules
/
multimatch
/
node_modules
/
arrify
|
|---|
| .. |
| index.d.ts |
| index.js |
| license |
| package.json |
| readme.md |
Convert a value to an array
$ npm install arrify
const arrify = require('arrify'); arrify('🦄'); //=> ['🦄'] arrify(['🦄']); //=> ['🦄'] arrify(new Set(['🦄'])); //=> ['🦄'] arrify(null); //=> [] arrify(undefined); //=> []
Supplying null or undefined results in an empty array.
MIT © Sindre Sorhus