epiphany/node_modules/arrify
2023-12-09 22:19:03 -08:00
..
index.d.ts install 11ty 2023-12-09 22:19:03 -08:00
index.js install 11ty 2023-12-09 22:19:03 -08:00
license install 11ty 2023-12-09 22:19:03 -08:00
package.json install 11ty 2023-12-09 22:19:03 -08:00
readme.md install 11ty 2023-12-09 22:19:03 -08: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