JSPM

array-ify

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8695387
  • Score
    100M100P100Q215935F
  • License MIT

Turn anything into an array

Package Exports

  • array-ify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-ify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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