Initial commit
[yaffs-website] / node_modules / arr-flatten / README.md
1 # arr-flatten [![NPM version](https://badge.fury.io/js/arr-flatten.svg)](http://badge.fury.io/js/arr-flatten)  [![Build Status](https://travis-ci.org/jonschlinkert/arr-flatten.svg)](https://travis-ci.org/jonschlinkert/arr-flatten) 
2
3 > Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
4
5 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%.
6
7 ## Run benchmarks
8
9 ```bash
10 npm run benchmarks
11 ```
12
13 Benchmark results comparing this library to [array-flatten]:
14
15 ```bash
16 #1: large.js
17   arr-flatten.js x 487,030 ops/sec ±0.67% (92 runs sampled)
18   array-flatten.js x 347,020 ops/sec ±0.57% (98 runs sampled)
19
20 #2: medium.js
21   arr-flatten.js x 1,914,516 ops/sec ±0.76% (94 runs sampled)
22   array-flatten.js x 1,391,661 ops/sec ±0.63% (96 runs sampled)
23
24 #3: small.js
25   arr-flatten.js x 5,158,980 ops/sec ±0.85% (94 runs sampled)
26   array-flatten.js x 3,683,173 ops/sec ±0.79% (97 runs sampled)
27 ```
28
29 ## Run tests
30
31 Install dev dependencies:
32
33 ```bash
34 npm i -d && npm test
35 ```
36
37 ## Install with [npm](npmjs.org)
38
39 ```bash
40 npm i arr-flatten --save
41 ```
42 ### Install with [bower](https://github.com/bower/bower)
43
44 ```bash
45 bower install arr-flatten --save
46 ```
47
48
49 ## Usage
50
51 ```js
52 var flatten = require('arr-flatten');
53
54 flatten(['a', ['b', ['c']], 'd', ['e']]);
55 //=> ['a', 'b', 'c', 'd', 'e']
56 ```
57
58 ## Author
59
60 **Jon Schlinkert**
61  
62 + [github/jonschlinkert](https://github.com/jonschlinkert)
63 + [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 
64
65 ## License
66 Copyright (c) 2014-2015 Jon Schlinkert  
67 Released under the MIT license
68
69 ***
70
71 _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 11, 2015._
72
73 [array-flatten]: https://github.com/blakeembrey/array-flatten