npm.io
1.0.0 • Published 11 years ago

array-ify

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
5

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

Keywords