Brak opisu

FFIB: 11e3a9652a first 7 lat temu
..
README.md 11e3a9652a first 7 lat temu
all.js 11e3a9652a first 7 lat temu
allLimit.js 11e3a9652a first 7 lat temu
allSeries.js 11e3a9652a first 7 lat temu
angelFall.js 11e3a9652a first 7 lat temu
any.js 11e3a9652a first 7 lat temu
anyLimit.js 11e3a9652a first 7 lat temu
anySeries.js 11e3a9652a first 7 lat temu
apply.js 11e3a9652a first 7 lat temu
applyEach.js 11e3a9652a first 7 lat temu
applyEachSeries.js 11e3a9652a first 7 lat temu
async.js 11e3a9652a first 7 lat temu
async.min.js 11e3a9652a first 7 lat temu
asyncify.js 11e3a9652a first 7 lat temu
auto.js 11e3a9652a first 7 lat temu
autoInject.js 11e3a9652a first 7 lat temu
cargo.js 11e3a9652a first 7 lat temu
compose.js 11e3a9652a first 7 lat temu
concat.js 11e3a9652a first 7 lat temu
concatLimit.js 11e3a9652a first 7 lat temu
concatSeries.js 11e3a9652a first 7 lat temu
constant.js 11e3a9652a first 7 lat temu
createLogger.js 11e3a9652a first 7 lat temu
detect.js 11e3a9652a first 7 lat temu
detectLimit.js 11e3a9652a first 7 lat temu
detectSeries.js 11e3a9652a first 7 lat temu
dir.js 11e3a9652a first 7 lat temu
doDuring.js 11e3a9652a first 7 lat temu
doUntil.js 11e3a9652a first 7 lat temu
doWhilst.js 11e3a9652a first 7 lat temu
during.js 11e3a9652a first 7 lat temu
each.js 11e3a9652a first 7 lat temu
eachLimit.js 11e3a9652a first 7 lat temu
eachOf.js 11e3a9652a first 7 lat temu
eachOfLimit.js 11e3a9652a first 7 lat temu
eachOfSeries.js 11e3a9652a first 7 lat temu
eachSeries.js 11e3a9652a first 7 lat temu
ensureAsync.js 11e3a9652a first 7 lat temu
every.js 11e3a9652a first 7 lat temu
everyLimit.js 11e3a9652a first 7 lat temu
everySeries.js 11e3a9652a first 7 lat temu
fast.js 11e3a9652a first 7 lat temu
filter.js 11e3a9652a first 7 lat temu
filterLimit.js 11e3a9652a first 7 lat temu
filterSeries.js 11e3a9652a first 7 lat temu
find.js 11e3a9652a first 7 lat temu
findLimit.js 11e3a9652a first 7 lat temu
findSeries.js 11e3a9652a first 7 lat temu
foldl.js 11e3a9652a first 7 lat temu
foldr.js 11e3a9652a first 7 lat temu
forEach.js 11e3a9652a first 7 lat temu
forEachLimit.js 11e3a9652a first 7 lat temu
forEachOf.js 11e3a9652a first 7 lat temu
forEachOfLimit.js 11e3a9652a first 7 lat temu
forEachOfSeries.js 11e3a9652a first 7 lat temu
forEachSeries.js 11e3a9652a first 7 lat temu
forever.js 11e3a9652a first 7 lat temu
groupBy.js 11e3a9652a first 7 lat temu
groupByLimit.js 11e3a9652a first 7 lat temu
groupBySeries.js 11e3a9652a first 7 lat temu
inject.js 11e3a9652a first 7 lat temu
iterator.js 11e3a9652a first 7 lat temu
log.js 11e3a9652a first 7 lat temu
map.js 11e3a9652a first 7 lat temu
mapLimit.js 11e3a9652a first 7 lat temu
mapSeries.js 11e3a9652a first 7 lat temu
mapValues.js 11e3a9652a first 7 lat temu
mapValuesLimit.js 11e3a9652a first 7 lat temu
mapValuesSeries.js 11e3a9652a first 7 lat temu
memoize.js 11e3a9652a first 7 lat temu
nextTick.js 11e3a9652a first 7 lat temu
omit.js 11e3a9652a first 7 lat temu
omitLimit.js 11e3a9652a first 7 lat temu
omitSeries.js 11e3a9652a first 7 lat temu
package.json 11e3a9652a first 7 lat temu
parallel.js 11e3a9652a first 7 lat temu
parallelLimit.js 11e3a9652a first 7 lat temu
pick.js 11e3a9652a first 7 lat temu
pickLimit.js 11e3a9652a first 7 lat temu
pickSeries.js 11e3a9652a first 7 lat temu
priorityQueue.js 11e3a9652a first 7 lat temu
queue.js 11e3a9652a first 7 lat temu
race.js 11e3a9652a first 7 lat temu
reduce.js 11e3a9652a first 7 lat temu
reduceRight.js 11e3a9652a first 7 lat temu
reflect.js 11e3a9652a first 7 lat temu
reflectAll.js 11e3a9652a first 7 lat temu
reject.js 11e3a9652a first 7 lat temu
rejectLimit.js 11e3a9652a first 7 lat temu
rejectSeries.js 11e3a9652a first 7 lat temu
retry.js 11e3a9652a first 7 lat temu
retryable.js 11e3a9652a first 7 lat temu
safe.js 11e3a9652a first 7 lat temu
select.js 11e3a9652a first 7 lat temu
selectLimit.js 11e3a9652a first 7 lat temu
selectSeries.js 11e3a9652a first 7 lat temu
seq.js 11e3a9652a first 7 lat temu
series.js 11e3a9652a first 7 lat temu
setImmediate.js 11e3a9652a first 7 lat temu
some.js 11e3a9652a first 7 lat temu
someLimit.js 11e3a9652a first 7 lat temu
someSeries.js 11e3a9652a first 7 lat temu
sortBy.js 11e3a9652a first 7 lat temu
sortByLimit.js 11e3a9652a first 7 lat temu
sortBySeries.js 11e3a9652a first 7 lat temu
timeout.js 11e3a9652a first 7 lat temu
times.js 11e3a9652a first 7 lat temu
timesLimit.js 11e3a9652a first 7 lat temu
timesSeries.js 11e3a9652a first 7 lat temu
transform.js 11e3a9652a first 7 lat temu
transformLimit.js 11e3a9652a first 7 lat temu
transformSeries.js 11e3a9652a first 7 lat temu
tryEach.js 11e3a9652a first 7 lat temu
unmemoize.js 11e3a9652a first 7 lat temu
until.js 11e3a9652a first 7 lat temu
waterfall.js 11e3a9652a first 7 lat temu
whilst.js 11e3a9652a first 7 lat temu
wrapSync.js 11e3a9652a first 7 lat temu

README.md

Neo-Async

npm Travis Codecov Dependency Status npm

Neo-Async is thought to be used as a drop-in replacement for Async, it almost fully covers its functionality and runs faster.

Benchmark is here!

Bluebird's benchmark is here!

Code Coverage

coverage

Installation

In a browser

<script src="async.min.js"></script>

In an AMD loader

require(['async'], function(async) {});

Promise and async/await

I recommend to use Aigle.

It is optimized for Promise handling and has almost the same functionality as neo-async.

Node.js

standard

$ npm install neo-async
var async = require('neo-async');

replacement

$ npm install neo-async
$ ln -s ./node_modules/neo-async ./node_modules/async
var async = require('async');

Bower

bower install neo-async

Feature

JSDoc

* not in Async

Collections

Control Flow

Utils

Mode

Benchmark

Benchmark: Async vs Neo-Async

How to check

$ git clone git@github.com:suguru03/async-benchmark.git
$ cd async-benchmark
$ npm install
$ node . // It might take more than one hour...

Environment

  • Ubuntu v12.04
  • Node.js v6.2.1
  • async v2.0.0-rc.6
  • neo-async v2.0.0-rc.1
  • benchmark v2.1.0
  • func-comparator v0.7.1

Result

Neo-Async is 1.27 ~ 10.7 times faster than Async.

The value is the ratio (Neo-Async/Async) of the average speed.

Collections

function benchmark func-comparator
each 3.71 2.54
eachSeries 2.14 1.90
eachLimit 2.14 1.88
eachOf 3.30 2.50
eachOfSeries 1.97 1.83
eachOfLimit 2.02 1.80
map 4.20 4.11
mapSeries 2.40 3.65
mapLimit 2.64 2.66
mapValues 5.71 5.32
mapValuesSeries 3.82 3.23
mapValuesLimit 3.10 2.38
filter 8.11 8.76
filterSeries 5.79 4.86
filterLimit 4.00 3.32
reject 9.47 9.52
rejectSeries 7.39 4.64
rejectLimit 4.54 3.49
detect 6.67 6.37
detectSeries 3.54 3.73
detectLimit 2.38 2.62
reduce 4.13 3.23
reduceRight 4.23 3.24
transform 5.30 5.17
sortBy 2.24 2.37
some 6.39 6.10
someSeries 5.37 4.66
someLimit 3.39 2.84
every 6.85 6.27
everySeries 4.53 3.90
everyLimit 3.36 2.75
concat 9.18 9.35
concatSeries 7.49 6.09

Control Flow

funciton benchmark func-comparator
parallel 7.54 5.45
series 3.29 2.41
waterfall 5.12 4.27
whilst 1.96 1.95
doWhilst 2.07 1.96
until 2.10 1.99
doUntil 1.98 2.04
during 10.7 7.09
doDuring 5.98 6.03
queue 1.83 1.75
priorityQueue 1.79 1.75
times 3.84 3.65
race 1.45 1.27
auto 3.23 3.50
retry 9.43 6.78