haifa-reminder/node_modules/arrify
2023-07-26 14:01:58 +03:00
..
index.d.ts adding node_modules + dist 2023-07-26 14:01:58 +03:00
index.js adding node_modules + dist 2023-07-26 14:01:58 +03:00
license adding node_modules + dist 2023-07-26 14:01:58 +03:00
package.json adding node_modules + dist 2023-07-26 14:01:58 +03:00
readme.md adding node_modules + dist 2023-07-26 14:01:58 +03: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