construct-array
Returns the passing value(anything .. string,number,null,undefined,object,array) as an array.
Motivation
Inspired by Sindre Sorhus
Installation
$ npm install --save construct-array
Usuage
let arrayify = ; ;//=>['India'];//=>[null];//=> [undefined];//=> [[2,3]] i.e arr[0]=[2,3];//=> [undefined];//=> [{name : "april"}] i.e array of objects
Related
- arrify - Convert a value to an array
The difference that is this module does NOT turn null
or undefined
to an empty array.
- array-ify - Turn anything into an array
The difference that is this module does NOT turn array
to array.
License
MIT © Bharathvaj Ganesan