lib/git.js
function caller() {
  const returnedArgs = Array.prototype.slice.call(arguments)
  const fn = returnedArgs.shift()
  const self = this

  return wrapPromise(function (resolve, reject) {
    returnedArgs.push(function (err, args) {
      if (err) {
        reject(err)
        return
      }

      resolve(args)
    })

    fn.apply(self, returnedArgs)
  })
}
function caller() {
  const returnedArgs = Array.prototype.slice.call(arguments)
  const fn = returnedArgs.shift()
  const self = this

  return wrapPromise(function (resolve, reject) {
    returnedArgs.push(function (err, args) {
      if (err) {
        reject(err)
        return
      }

      resolve(args)
    })

    fn.apply(self, returnedArgs)
  })
}
function caller ( ) { const returnedArgs = Array . prototype . slice . call ( arguments ) const fn = returnedArgs . shift ( ) const self = this return wrapPromise ( function ( resolve , reject ) { returnedArgs . push ( function ( err , args ) { if ( err ) { reject ( err ) return } resolve ( args ) } ) fn . apply ( self , returnedArgs ) } ) }
Caller abstract method
for promisifying traditional callback methods
Caller abstract method for promisifying traditional callback methods