Socket
Socket
Sign inDemoInstall

neo-async

Package Overview
Dependencies
0
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    neo-async

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


Version published
Maintainers
1
Install size
647 kB
Created

Package description

What is neo-async?

The neo-async package is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. It is similar to the async package but with some performance improvements.

What are neo-async's main functionalities?

Control Flow

Execute a series of functions in sequential order. Each function is passed a callback it must call on completion.

async.series([
  function(callback) {
    // do some stuff ...
    callback(null, 'one');
  },
  function(callback) {
    // do some more stuff ...
    callback(null, 'two');
  }
],
function(err, results) {
  // results is now equal to ['one', 'two']
});

Collections

Apply a function to each item in a collection and collect the results.

async.map(['file1','file2','file3'], fs.stat, function(err, results) {
  // results is now an array of stats for each file
});

Utilities

Call a function a certain number of times and collect the results.

async.times(5, function(n, next) {
  createUser(n, function(err, user) {
    next(err, user);
  });
}, function(err, users) {
  // we should now have 5 users
});

Other packages similar to neo-async

Readme

Source

Neo-Async v2.0.0-rc.1

npm Travis Codecov Dependency Status npm

nodei

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

Code Coverage

coverage

Installation

In a browser

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

In an AMD loader

require(['async'], function(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

Speed Comparison

  • async v1.3.0
  • neo-async v1.3.0

Server-side

Speed comparison of server-side measured by func-comparator.

Specifications are as follows.

  • n times trials
  • Random execution order
  • Measure the average speed[μs] of n times

execute

  • 100 times trials
  • 500000 tasks

Execution environment are as follows.

  • node v0.10.40
  • node v0.12.7
  • iojs v2.3.4
$ node perf/func-comparator

result

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

collections
functionnode v0.10.40node v0.12.7iojs v2.3.4
each2.011.952.19
eachSeries2.282.622.28
eachLimit2.333.322.81
eachOf1.931.922.12
eachOfSeries2.172.792.98
eachOfLimit2.031.542.57
map3.103.113.38
mapSeries2.361.982.32
mapLimit1.761.842.06
filter2.333.706.59
filterSeries2.112.713.68
reject2.714.387.33
rejectSeries2.313.093.86
detect2.312.692.92
detectSeries2.131.962.71
reduce2.091.942.26
reduceRight2.191.932.51
sortBy1.411.661.52
some2.232.292.50
every2.222.252.93
concat12.07.2310.0
concatSeries8.375.158.05
control flow
functionnode v0.10.40node v0.12.7iojs v2.3.4
parallel4.135.003.37
series3.132.703.03
parallelLimit2.692.962.49
waterfall3.457.247.59
whilst1.021.091.14
doWhilst1.261.361.28
until1.021.081.13
doUntil1.251.311.34
during2.152.082.08
doDuring5.085.775.39
times4.073.163.44
timesSeries2.822.582.71
timesLimit2.232.051.93

Keywords

FAQs

Last updated on 08 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc