src/index.js
function colorErrors(stdLine) {
  // lazy load chalk
  if (chalk === undefined) {
    chalk = require("chalk");
  }

  return colorErrorPatterns.reduce((op, pattern) => {
    const matches = pattern.exec(op);

    if (matches !== null && matches.length > 0) {
      op = op.replace(pattern, chalk.red(matches[0]));
    }

    return op;
  }, stdLine);
}
function colorErrors(stdLine) {
  // lazy load chalk
  if (chalk === undefined) {
    chalk = require("chalk");
  }

  return colorErrorPatterns.reduce((op, pattern) => {
    const matches = pattern.exec(op);

    if (matches !== null && matches.length > 0) {
      op = op.replace(pattern, chalk.red(matches[0]));
    }

    return op;
  }, stdLine);
}
function colorErrors ( stdLine ) { // lazy load chalk if ( chalk === undefined ) { chalk = require ( "chalk" ) ; } return colorErrorPatterns . reduce ( ( op , pattern ) => { const matches = pattern . exec ( op ) ; if ( matches !== null && matches . length > 0 ) { op = op . replace ( pattern , chalk . red ( matches [ 0 ] ) ) ; } return op ; } , stdLine ) ; }
Take a string from stderr and color error types
@private
@method colorErrors
@param {string} stdLine
@returns {string}
Take a string from stderr and color error types