asyncify.js

0.1.2 • Public • Published

Asyncify

Makes a function conform to node-style callback convention

Install:

npm install asyncify.js

Usage:

var async = require('async');
require('asyncify');

var doSomeWork = function( t ){
  console.log("doin' work");
  $('.page-title').text( t );
};

async.series([
  console.log.async( console, 1, 2 )
, doSomeWork.async( null, 'Ohyeaaaah' )
, console.log.async().bind( console, 'also, use bind' )
, console.log.async( console, 'complete, ':)' )
]);

// => 1, 2
// => doin' work
// => also, use bind
// => complete :)

Readme

Keywords

Package Sidebar

Install

npm i asyncify.js

Weekly Downloads

0

Version

0.1.2

License

ISC

Last publish

Collaborators

  • johndotawesome