TKK_E32230148/node_modules/arrify
developer e3ff188623 Initial commit 2026-07-01 11:03:19 +07:00
..
index.d.ts Initial commit 2026-07-01 11:03:19 +07:00
index.js Initial commit 2026-07-01 11:03:19 +07:00
license Initial commit 2026-07-01 11:03:19 +07:00
package.json Initial commit 2026-07-01 11:03:19 +07:00
readme.md Initial commit 2026-07-01 11:03:19 +07:00

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