src/utils/errors.js
function loggerize(message, type) {
  return function() {
    let output = message.apply(message, arguments);
    if (_.isArray(output)) {
      logger[type].apply(logger, output);
    } else {
      logger[type](output);
    }
    // Return the message in case it's needed. (I.E. for utils.alert)
    return output;
  };
}
function loggerize(message, type) {
  return function() {
    let output = message.apply(message, arguments);
    if (_.isArray(output)) {
      logger[type].apply(logger, output);
    } else {
      logger[type](output);
    }
    // Return the message in case it's needed. (I.E. for utils.alert)
    return output;
  };
}
function loggerize ( message , type ) { return function ( ) { let output = message . apply ( message , arguments ) ; if ( _ . isArray ( output ) ) { logger [ type ] . apply ( logger , output ) ; } else { logger [ type ] ( output ) ; } // Return the message in case it's needed. (I.E. for utils.alert) return output ; } ; }
Returns a logger call with the provided message and type
@param  {function} message  function that returns a string, or an array containing
a string and additional arguments for logger.
@param  {string} type The type of log to make (warning, error, exception, etc...)
@return {function}      Function that calls logger with the provided message and type
Returns a logger call with the provided message and type