1.0.4 • Published 5 years ago

datawaiter v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Data Waiter

This is a package to change the way we manage asynchrone code.

Sometimes, we have to manage multi process witch can be in same times, but, callback block this.

To "fix" that, I made a plugin who handle the final callback, and the number of require caller

You can pass to the set function a key/value you can access in the param of the callback.

// require module
const DataWaiter = require('../DataWaiter/index');

// declare datawriter handler
var dw = new DataWaiter(3);

// set the callback
dw.cb = function (data) {
    console.log(data);
    console.log(data.name + " " + data.last);
}

// In each callback, call a final
dw.set("last", "Marty");
dw.set("name", "Arthur");
dw.set("bidule", ["toto", "tati", "tata"]);
1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago