bin/pastebin.js
function runWithCallback(promiseFunc, callback) {
  if (!_.isFunction(callback)) { throw new Error('This function requires a callback!'); }
  promiseFunc.then(function (data) {
      callback(null, data);
  }).catch(function (err) {
      callback(err, null);
  });
}
function runWithCallback(promiseFunc, callback) {
  if (!_.isFunction(callback)) { throw new Error('This function requires a callback!'); }
  promiseFunc.then(function (data) {
      callback(null, data);
  }).catch(function (err) {
      callback(err, null);
  });
}
function runWithCallback ( promiseFunc , callback ) { if ( ! _ . isFunction ( callback ) ) { throw new Error ( 'This function requires a callback!' ) ; } promiseFunc . then ( function ( data ) { callback ( null , data ) ; } ) . catch ( function ( err ) { callback ( err , null ) ; } ) ; }
*************************************************
Synchronous methods
*************************************************
************************************************* Synchronous methods *************************************************