@coolgk/array
a javascript / typescript module
npm install @coolgk/array
array utilities
Report bugs here: https://github.com/coolgk/node-utils/issues
Examples
import { toArray } from '@coolgk/array';
const a = undefined;
const b = false;
const c = '';
const d = [1,2,3];
const e = {a:1};
console.log(toArray(a));
console.log(toArray(b));
console.log(toArray(c));
console.log(toArray(d));
console.log(toArray(e));
toArray(data) ⇒ array
Kind: global function
Param | Type | Description |
---|
data | * | any data to be type cast to array |