'use strict'
module.exports = promisify

const Bluebird = require('bluebird')

function promisify (fn, bind) {
  return function () {
    const self = bind || this
    return Bluebird.all(arguments).then(args => {
      return new Bluebird((resolve, reject) => {
        args.push((err, value) => err ? reject(err) : resolve(value))
        return fn.apply(self, args)
      })
    })
  }
}

promisify.args = function (fn, bind) {
  return function () {
    const self = bind || this
    return Bluebird.all(arguments).then(args => fn.apply(self, args))
  }
}

@@ -33,17 +33,45 @@
 omisify%0A
+const util = require('util')
 %0A
-
 const Bl
@@ -124,32 +124,65 @@
 fy (fn, bind) %7B%0A
+  const raw = util.promisify(fn)%0A
   return functio
@@ -285,131 +285,11 @@
 urn 
-new Bluebird((resolve, reject) =%3E %7B%0A        args.push((err, value) =%3E err ? reject(err) : resolve(value))%0A        return fn
+raw
 .app
@@ -307,17 +307,8 @@
 gs)%0A
-      %7D)%0A
     

use util.promisify, what could go wrong?