1.0.4 • Published 9 years ago

async-flattner v1.0.4

Weekly downloads
7
License
ISC
Repository
github
Last release
9 years ago

Async-Flattner

Node.js module which will flatten a multi-dimensional array of ints.

Will flatten a sparse array to flat list.

Only works on positive indexed arrays, negative indexed elements in javascript are considered properties not elements of the array.

All logic contained in index.js. Tests contained in test/index.js.

NPM page here

Try it out in your browser here

Usage

Install with npm install async-flattner

var flatten = require('async-flattner');

var arr = [1,2,3,[4,5],7,[8,[9]]];

flatten(arr)
    .then(function(result) {
      // do something with flat array
    })
    .fail(function (error) {
      // handle error
    });

// program continues asynchronously
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago