Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/claudiopro/flattery

⛑ Flattens an array of nested arrays into a list of numbers
https://github.com/claudiopro/flattery

Last synced: about 1 month ago
JSON representation

⛑ Flattens an array of nested arrays into a list of numbers

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/claudiopro/flattery.svg?branch=master)](https://travis-ci.org/claudiopro/flattery)

# flattery

Flattens an array of nested arrays into a list of scalar elements

# Instructions

Install via `npm`:

```bash
npm install flattery --save
```

Use in your Node scripts like this:

```js
const flattery = require('flattery');

var flattened = flattery([[1, 2, [3]], 4]); // -> [1, 2, 3, 4]
```

# License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) Claudio Procida 2015-2016