1.0.0 • Published 3 years ago

1d v1.0.0

Weekly downloads
53
License
MIT
Repository
github
Last release
3 years ago

Installation

npm install 1d

Usage

const flatten = require('1d');

flatten( [['a'], 'b', ['c', ['d']]] );
// ['a', 'b', 'c', 'd']

OBS: This is a built-in feature from Node.js 11.15.0 and up. Check out Array.prototype.flat

API

oned(arr, res)

Flatten an array into a sweet 1D array

arr

Type: Array

Input array to flatten

res

Type: Array Default: []

Initial array.

Note: The inital array is not being flattened

License

MIT © Terkel Gjervig

1.0.0

3 years ago

0.1.1

3 years ago

0.1.0

5 years ago