index.js
// Helper function to print results in the console
Helper function to print results in the console
Helper function to print results in the console
function printResultFor(op) {
    return function printResult(err, res) {
      if (err) console.log(op + ' error: ' + err.toString());
      if (res) console.log(op + ' status: ' + res.constructor.name);
    };
  }
function printResultFor ( op ) { return function printResult ( err , res ) { if ( err ) console . log ( op + ' error: ' + err . toString ( ) ) ; if ( res ) console . log ( op + ' status: ' + res . constructor . name ) ; } ; }
Helper function to print results in the console
Helper function to print results in the console