nod

nodeasync

nodeasync node async eventemitter, nodeasync async array iterator

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

8yrs ago

Contributors

0

Package

Dependencies

0

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

async eventemitter

var EventEmitter = require('nodeasync').EventEmitter;

var myEmitter = new EventEmitter(); myEmitter.on("save", function (param1, param2, param3, next) { //do some async work here and call next console.log("param1>>>" + JSON.stringify(param1)); next(); })

myEmitter.emit("save", {person:"A"}, function () { //it will be called after calling each on for save console.log("ok") })

===============================================

var Iterator = require('nodeasync').Iterator;

var emails = ["a@a.com", "b@b.com"];

var emailIterator = new Iterator(emails, function (index, emailid, next) { //it will be called for each element in array //after doing some async work call next console.log(emailid) next();

});

emailIterator.iterate(function (err) { //it will be called after iterating each element console.log("complete") })

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial