index.js
function wrap_cb(fn, P) {
  return function (params) {
    return new P(function (resolve, reject) {
      fn(params, function (err) { return !err ? resolve() : reject(err); });
    });
  };
}
function wrap_cb(fn, P) {
  return function (params) {
    return new P(function (resolve, reject) {
      fn(params, function (err) { return !err ? resolve() : reject(err); });
    });
  };
}
function wrap_cb ( fn , P ) { return function ( params ) { return new P ( function ( resolve , reject ) { fn ( params , function ( err ) { return ! err ? resolve ( ) : reject ( err ) ; } ) ; } ) ; } ; }
Wrap handler with callback
Wrap handler with callback