arr-flatten 1.0.3

Recursively flatten an array or arrays.

Homepage: https://github.com/jonschlinkert/arr-flatten

Platform: npm

Language: JavaScript

License: MIT

Keywords: arr, array, elements, flat, flatten, nested, recurse, recursive, recursively

Repository: git+https://github.com/jonschlinkert/arr-flatten.git

View on registry: https://www.npmjs.com/package/arr-flatten

Direct download link: https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz

Install: npm install [email protected]


arr-flatten NPM version NPM monthly downloads Linux Build Status Windows Build Status

Recursively flatten an array or arrays.

Install

Install with npm:

$ npm install --save arr-flatten

Install with yarn:

$ yarn add arr-flatten

Install

Install with bower

$ bower install arr-flatten --save

Usage

var flatten = require('arr-flatten');

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

Why another flatten utility?

I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.

About

Related projects

  • arr-filter: Faster alternative to javascript's native filter method. | homepage
  • arr-union: Combines a list of arrays, returning a single array with unique values, using strict equality… more | homepage
  • array-each: Loop over each item in an array and call the given function on every element. | homepage
  • array-unique: Remove duplicate values from an array. Fastest ES5 implementation. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.5.0, on April 16, 2017.


Development Dependencies Requirements Latest Stable Latest Release Licenses
ansi-bold ^0.1.1 0.1.1 0.1.1 MIT
array-flatten ^2.1.1 2.1.1 2.1.1 MIT
array-slice ^1.0.0 1.0.0 1.0.0 MIT
benchmarked ^1.0.0 1.1.0 1.1.0 MIT
compute-flatten ^1.0.0 1.0.0 1.0.0 MIT
flatit ^1.1.1 1.1.1 1.1.1 MIT
flatten ^1.0.2 1.0.2 1.0.2 MIT
flatten-array ^1.0.0 2.0.0 2.0.0 MIT
glob ^7.1.1 7.1.1 7.1.1 ISC
gulp-format-md ^0.1.12 0.1.12 0.1.12 MIT
just-flatten-it ^1.1.23 1.1.23 1.1.23 MIT
lodash.flattendeep ^4.4.0 4.4.0 4.4.0 MIT
m_flattened ^1.0.1 1.0.1 1.0.1 MIT
mocha ^3.2.0 3.3.0 3.3.0 MIT
utils-flatten ^1.0.0 1.0.0 1.0.0 MIT
write ^0.3.3 0.3.3 0.3.3 MIT
Explore the resolved development dependency tree for arr-flatten 1.0.3

Sustain

Releases

1.0.3 April 17, 2017
1.0.2 April 14, 2017
1.0.1 March 11, 2015
1.0.0 January 20, 2015
0.2.1 November 09, 2014
0.2.0 October 28, 2014
0.1.0 September 26, 2014

Project Statistics

SourceRank 19
Dependencies 0
Dependent projects 79
Dependent repositories 11.2K
Total releases 7
Latest release
First release
Stars 20
Forks 2
Watchers 6
Contributors 1
Repo Size: 21.5 KB

Top Contributors See all

Jon Schlinkert

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-04-21 14:07:38 UTC

Login to resync this project