syncblock

0.1.1 • Public • Published

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();
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i syncblock

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • devebot