syncblock
v0.1.1
Published
Turns async block into sync
Downloads
2
Readme
syncblock
Turns Asynchronous block into synchronous one
Usage
Install
$ npm install --save syncblock
Example
var fs = require('fs');
var syncblock = require('syncblock');
syncblock.begin(function(ticket) {
// request HTTP, read/write DB,...
fs.readFile('/etc/passwd', function(err, data) {
if (err) throw err;
console.log(data);
ticket.end();
});
});