Irina Glushko 2389e7160b HW1 done 3 rokov pred
..
index.d.ts 2389e7160b HW1 done 3 rokov pred
index.js 2389e7160b HW1 done 3 rokov pred
license 2389e7160b HW1 done 3 rokov pred
package.json 2389e7160b HW1 done 3 rokov pred
readme.md 2389e7160b HW1 done 3 rokov pred

readme.md

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