dist/webduino-all.js
function callback(ctx, err, result) {
    if (typeof ctx.custom === 'function') {
      var cust = function () {
        // Bind the callback to itself, so the resolve and reject
        // properties that we bound are available to the callback.
        // Then we push it onto the end of the arguments array.
        return ctx.custom.apply(cust, arguments);
      };
      cust.resolve = ctx.resolve;
      cust.reject = ctx.reject;
      cust.call(null, err, result);
    } else {
      if (err) {
        return ctx.reject(err);
      }
      ctx.resolve(result);
    }
  }
function callback(ctx, err, result) {
    if (typeof ctx.custom === 'function') {
      var cust = function () {
        // Bind the callback to itself, so the resolve and reject
        // properties that we bound are available to the callback.
        // Then we push it onto the end of the arguments array.
        return ctx.custom.apply(cust, arguments);
      };
      cust.resolve = ctx.resolve;
      cust.reject = ctx.reject;
      cust.call(null, err, result);
    } else {
      if (err) {
        return ctx.reject(err);
      }
      ctx.resolve(result);
    }
  }
function callback ( ctx , err , result ) { if ( typeof ctx . custom === 'function' ) { var cust = function ( ) { // Bind the callback to itself, so the resolve and reject // properties that we bound are available to the callback. // Then we push it onto the end of the arguments array. return ctx . custom . apply ( cust , arguments ) ; } ; cust . resolve = ctx . resolve ; cust . reject = ctx . reject ; cust . call ( null , err , result ) ; } else { if ( err ) { return ctx . reject ( err ) ; } ctx . resolve ( result ) ; } }
Default callback function - rejects on truthy error, otherwise resolves
Default callback function - rejects on truthy error otherwise resolves