source: trip-planner-front/node_modules/neo-async/README.md@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 12.5 KB
Line 
1<h1 align="center">Neo-Async</h1>
2
3<p align="center">
4 <img src="https://raw.githubusercontent.com/wiki/suguru03/neo-async/images/neo_async_v2.png" width="250px" />
5</p>
6
7<p align="center">
8 <a href="https://www.npmjs.com/package/neo-async"><img alt="npm" src="https://img.shields.io/npm/v/neo-async.svg"></a>
9 <a href="https://travis-ci.org/suguru03/neo-async"><img alt="Travis Status" src="https://img.shields.io/travis/suguru03/neo-async.svg"></a>
10 <a href="https://codecov.io/gh/suguru03/neo-async"><img alt="Coverage Status" src="https://img.shields.io/codecov/c/github/suguru03/neo-async/master.svg"></a>
11 <a href="https://www.npmjs.com/package/neo-async"><img alt="download" src="https://img.shields.io/npm/dm/neo-async.svg"></a>
12 <a href="https://lgtm.com/projects/g/suguru03/neo-async/context:javascript"><img src="https://img.shields.io/lgtm/grade/javascript/g/suguru03/neo-async.svg?logo=lgtm&logoWidth=18" alt="Code Quality: Javascript" height="18"></a>
13 <a href="https://lgtm.com/projects/g/suguru03/neo-async/alerts"><img src="https://img.shields.io/lgtm/alerts/g/suguru03/neo-async.svg?logo=lgtm&logoWidth=18" alt="Total Alerts" height="18"></a>
14 <a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async?ref=badge_shield"><img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async.svg?type=shield" alt="FOSSA" height="18"></a>
15</p>
16
17Neo-Async is thought to be used as a drop-in replacement for [Async](https://github.com/caolan/async), it almost fully covers its functionality and runs [faster](#benchmark).
18
19Benchmark is [here](#benchmark)!
20
21Bluebird's benchmark is [here](https://github.com/suguru03/bluebird/tree/aigle/benchmark)!
22
23## Code Coverage
24![coverage](https://raw.githubusercontent.com/wiki/suguru03/neo-async/images/coverage.png)
25
26## Installation
27
28### In a browser
29```html
30<script src="async.min.js"></script>
31```
32
33### In an AMD loader
34```js
35require(['async'], function(async) {});
36```
37
38### Promise and async/await
39
40I recommend to use [`Aigle`](https://github.com/suguru03/aigle).
41
42It is optimized for Promise handling and has almost the same functionality as `neo-async`.
43
44### Node.js
45
46#### standard
47
48```bash
49$ npm install neo-async
50```
51```js
52var async = require('neo-async');
53```
54
55#### replacement
56```bash
57$ npm install neo-async
58$ ln -s ./node_modules/neo-async ./node_modules/async
59```
60```js
61var async = require('async');
62```
63
64### Bower
65
66```bash
67bower install neo-async
68```
69
70## Feature
71
72[JSDoc](http://suguru03.github.io/neo-async/doc/async.html)
73
74\* not in Async
75
76### Collections
77
78- [`each`](http://suguru03.github.io/neo-async/doc/async.each.html)
79- [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html)
80- [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html)
81- [`forEach`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html)
82- [`forEachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html)
83- [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html)
84- [`eachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html)
85- [`eachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html)
86- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`eachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html)
87- [`forEachOf`](http://suguru03.github.io/neo-async/doc/async.each.html) -> [`each`](http://suguru03.github.io/neo-async/doc/async.each.html)
88- [`forEachOfSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html) -> [`eachSeries`](http://suguru03.github.io/neo-async/doc/async.eachSeries.html)
89- [`eachOfLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html) -> [`forEachLimit`](http://suguru03.github.io/neo-async/doc/async.eachLimit.html)
90- [`map`](http://suguru03.github.io/neo-async/doc/async.map.html)
91- [`mapSeries`](http://suguru03.github.io/neo-async/doc/async.mapSeries.html)
92- [`mapLimit`](http://suguru03.github.io/neo-async/doc/async.mapLimit.html)
93- [`mapValues`](http://suguru03.github.io/neo-async/doc/async.mapValues.html)
94- [`mapValuesSeries`](http://suguru03.github.io/neo-async/doc/async.mapValuesSeries.html)
95- [`mapValuesLimit`](http://suguru03.github.io/neo-async/doc/async.mapValuesLimit.html)
96- [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html)
97- [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html)
98- [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html)
99- [`select`](http://suguru03.github.io/neo-async/doc/async.filter.html) -> [`filter`](http://suguru03.github.io/neo-async/doc/async.filter.html)
100- [`selectSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html) -> [`filterSeries`](http://suguru03.github.io/neo-async/doc/async.filterSeries.html)
101- [`selectLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html) -> [`filterLimit`](http://suguru03.github.io/neo-async/doc/async.filterLimit.html)
102- [`reject`](http://suguru03.github.io/neo-async/doc/async.reject.html)
103- [`rejectSeries`](http://suguru03.github.io/neo-async/doc/async.rejectSeries.html)
104- [`rejectLimit`](http://suguru03.github.io/neo-async/doc/async.rejectLimit.html)
105- [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html)
106- [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html)
107- [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html)
108- [`find`](http://suguru03.github.io/neo-async/doc/async.detect.html) -> [`detect`](http://suguru03.github.io/neo-async/doc/async.detect.html)
109- [`findSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html) -> [`detectSeries`](http://suguru03.github.io/neo-async/doc/async.detectSeries.html)
110- [`findLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html) -> [`detectLimit`](http://suguru03.github.io/neo-async/doc/async.detectLimit.html)
111- [`pick`](http://suguru03.github.io/neo-async/doc/async.pick.html) *
112- [`pickSeries`](http://suguru03.github.io/neo-async/doc/async.pickSeries.html) *
113- [`pickLimit`](http://suguru03.github.io/neo-async/doc/async.pickLimit.html) *
114- [`omit`](http://suguru03.github.io/neo-async/doc/async.omit.html) *
115- [`omitSeries`](http://suguru03.github.io/neo-async/doc/async.omitSeries.html) *
116- [`omitLimit`](http://suguru03.github.io/neo-async/doc/async.omitLimit.html) *
117- [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html)
118- [`inject`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html)
119- [`foldl`](http://suguru03.github.io/neo-async/doc/async.reduce.html) -> [`reduce`](http://suguru03.github.io/neo-async/doc/async.reduce.html)
120- [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html)
121- [`foldr`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html) -> [`reduceRight`](http://suguru03.github.io/neo-async/doc/async.reduceRight.html)
122- [`transform`](http://suguru03.github.io/neo-async/doc/async.transform.html)
123- [`transformSeries`](http://suguru03.github.io/neo-async/doc/async.transformSeries.html) *
124- [`transformLimit`](http://suguru03.github.io/neo-async/doc/async.transformLimit.html) *
125- [`sortBy`](http://suguru03.github.io/neo-async/doc/async.sortBy.html)
126- [`sortBySeries`](http://suguru03.github.io/neo-async/doc/async.sortBySeries.html) *
127- [`sortByLimit`](http://suguru03.github.io/neo-async/doc/async.sortByLimit.html) *
128- [`some`](http://suguru03.github.io/neo-async/doc/async.some.html)
129- [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html)
130- [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html)
131- [`any`](http://suguru03.github.io/neo-async/doc/async.some.html) -> [`some`](http://suguru03.github.io/neo-async/doc/async.some.html)
132- [`anySeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html) -> [`someSeries`](http://suguru03.github.io/neo-async/doc/async.someSeries.html)
133- [`anyLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html) -> [`someLimit`](http://suguru03.github.io/neo-async/doc/async.someLimit.html)
134- [`every`](http://suguru03.github.io/neo-async/doc/async.every.html)
135- [`everySeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html)
136- [`everyLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html)
137- [`all`](http://suguru03.github.io/neo-async/doc/async.every.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.every.html)
138- [`allSeries`](http://suguru03.github.io/neo-async/doc/async.everySeries.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everySeries.html)
139- [`allLimit`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html) -> [`every`](http://suguru03.github.io/neo-async/doc/async.everyLimit.html)
140- [`concat`](http://suguru03.github.io/neo-async/doc/async.concat.html)
141- [`concatSeries`](http://suguru03.github.io/neo-async/doc/async.concatSeries.html)
142- [`concatLimit`](http://suguru03.github.io/neo-async/doc/async.concatLimit.html) *
143
144### Control Flow
145
146- [`parallel`](http://suguru03.github.io/neo-async/doc/async.parallel.html)
147- [`series`](http://suguru03.github.io/neo-async/doc/async.series.html)
148- [`parallelLimit`](http://suguru03.github.io/neo-async/doc/async.series.html)
149- [`tryEach`](http://suguru03.github.io/neo-async/doc/async.tryEach.html)
150- [`waterfall`](http://suguru03.github.io/neo-async/doc/async.waterfall.html)
151- [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) *
152- [`angelfall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) -> [`angelFall`](http://suguru03.github.io/neo-async/doc/async.angelFall.html) *
153- [`whilst`](#whilst)
154- [`doWhilst`](#doWhilst)
155- [`until`](#until)
156- [`doUntil`](#doUntil)
157- [`during`](#during)
158- [`doDuring`](#doDuring)
159- [`forever`](#forever)
160- [`compose`](#compose)
161- [`seq`](#seq)
162- [`applyEach`](#applyEach)
163- [`applyEachSeries`](#applyEachSeries)
164- [`queue`](#queue)
165- [`priorityQueue`](#priorityQueue)
166- [`cargo`](#cargo)
167- [`auto`](#auto)
168- [`autoInject`](#autoInject)
169- [`retry`](#retry)
170- [`retryable`](#retryable)
171- [`iterator`](#iterator)
172- [`times`](http://suguru03.github.io/neo-async/doc/async.times.html)
173- [`timesSeries`](http://suguru03.github.io/neo-async/doc/async.timesSeries.html)
174- [`timesLimit`](http://suguru03.github.io/neo-async/doc/async.timesLimit.html)
175- [`race`](#race)
176
177### Utils
178- [`apply`](#apply)
179- [`setImmediate`](#setImmediate)
180- [`nextTick`](#nextTick)
181- [`memoize`](#memoize)
182- [`unmemoize`](#unmemoize)
183- [`ensureAsync`](#ensureAsync)
184- [`constant`](#constant)
185- [`asyncify`](#asyncify)
186- [`wrapSync`](#asyncify) -> [`asyncify`](#asyncify)
187- [`log`](#log)
188- [`dir`](#dir)
189- [`timeout`](http://suguru03.github.io/neo-async/doc/async.timeout.html)
190- [`reflect`](#reflect)
191- [`reflectAll`](#reflectAll)
192- [`createLogger`](#createLogger)
193
194## Mode
195- [`safe`](#safe) *
196- [`fast`](#fast) *
197
198## Benchmark
199
200[Benchmark: Async vs Neo-Async](http://suguru03.hatenablog.com/entry/2016/06/10/135559)
201
202### How to check
203
204```bash
205$ node perf
206```
207
208### Environment
209
210* Darwin 17.3.0 x64
211* Node.js v8.9.4
212* async v2.6.0
213* neo-async v2.5.0
214* benchmark v2.1.4
215
216### Result
217
218The value is the ratio (Neo-Async/Async) of the average speed.
219
220#### Collections
221|function|benchmark|
222|---|--:|
223|each/forEach|2.43|
224|eachSeries/forEachSeries|1.75|
225|eachLimit/forEachLimit|1.68|
226|eachOf|3.29|
227|eachOfSeries|1.50|
228|eachOfLimit|1.59|
229|map|3.95|
230|mapSeries|1.81|
231|mapLimit|1.27|
232|mapValues|2.73|
233|mapValuesSeries|1.59|
234|mapValuesLimit|1.23|
235|filter|3.00|
236|filterSeries|1.74|
237|filterLimit|1.17|
238|reject|4.59|
239|rejectSeries|2.31|
240|rejectLimit|1.58|
241|detect|4.30|
242|detectSeries|1.86|
243|detectLimit|1.32|
244|reduce|1.82|
245|transform|2.46|
246|sortBy|4.08|
247|some|2.19|
248|someSeries|1.83|
249|someLimit|1.32|
250|every|2.09|
251|everySeries|1.84|
252|everyLimit|1.35|
253|concat|3.79|
254|concatSeries|4.45|
255
256#### Control Flow
257|funciton|benchmark|
258|---|--:|
259|parallel|2.93|
260|series|1.96|
261|waterfall|1.29|
262|whilst|1.00|
263|doWhilst|1.12|
264|until|1.12|
265|doUntil|1.12|
266|during|1.18|
267|doDuring|2.42|
268|times|4.25|
269|auto|1.97|
270
271
272## License
273[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fsuguru03%2Fneo-async?ref=badge_large)
Note: See TracBrowser for help on using the repository browser.