devsite/node_modules/arrify
2024-07-07 18:49:38 -07:00
..
index.d.ts more 2024-07-07 18:49:38 -07:00
index.js more 2024-07-07 18:49:38 -07:00
license more 2024-07-07 18:49:38 -07:00
package.json more 2024-07-07 18:49:38 -07:00
readme.md more 2024-07-07 18:49:38 -07:00

arrify Build Status

Convert a value to an array

Install

$ npm install arrify

Usage

const arrify = require('arrify');

arrify('🦄');
//=> ['🦄']

arrify(['🦄']);
//=> ['🦄']

arrify(new Set(['🦄']));
//=> ['🦄']

arrify(null);
//=> []

arrify(undefined);
//=> []

Supplying null or undefined results in an empty array.

License

MIT © Sindre Sorhus