conventional-changelog-action/node_modules/array-ify
Conventional Changelog Action bf7e9cbfcd chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
..
README.md chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
index.js chore(release): v3.1.1 2020-07-13 17:58:28 +00:00
package.json chore(release): v3.1.1 2020-07-13 17:58:28 +00:00

README.md

NPM version Build Status Dependency Status Coverage Status

Turn anything into an array

Install

$ npm install --save array-ify

Usage

var arrayify = require('array-ify');

arrayify('unicorn');
//=> ['unicorn']

arrayify(['unicorn']);
//=> ['unicorn']

arrayify(null);
//=> [null]

arrayify(undefined);
//=> [undefined]
  • arrify - Convert a value to an array

The difference that is this module does NOT turn null or undefined to an empty array.

License

MIT © Steve Mao