[go: up one dir, main page]

array-to

0.0.8 • Public • Published

array-to

NPM

Convert Value to Array.

var to = require('array-to');
// to(<value>)
 
var a = new Set().add('Namby').add('Pamby').add('Magicians');
 
to(a);
// ["Namby", "Pamby", "Magicians"]
 
to(['n', 'p', 'm']);
// ["n", "p", "m"]  (same array)
 
to('Magicians');
// ["Magicians"]
 
to(null);
// [null]

Readme

Keywords

Package Sidebar

Install

npm i array-to

Weekly Downloads

1

Version

0.0.8

License

MIT

Last publish

Collaborators

  • wolfram77