Skip to content

jrf0110/asyncify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 :)

About

Makes a function conform to node-style callback convention

Resources

Stars

Watchers

Forks

Packages

No packages published