Breadbot/node_modules/arrify
2022-11-13 11:09:44 -05:00
..
index.d.ts Push before general cleanup to avoid merge errors 2022-11-13 11:09:44 -05:00
license Push before general cleanup to avoid merge errors 2022-11-13 11:09:44 -05:00
package.json Push before general cleanup to avoid merge errors 2022-11-13 11:09:44 -05:00
readme.md Push before general cleanup to avoid merge errors 2022-11-13 11:09:44 -05: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