lib/dep-validate.js
function format(results) {
  if (_isFormatted(results)) {
    return results;
  }

  var dependencyErrors = results.dependencies || [];
  var devDependencyErrors = results.devDependencies || [];

  var formattedErrors = { };

  formattedErrors.dependencies = dependencyErrors.length
    ? _formatErrors('Dependencies', dependencyErrors)
    : dependencyErrors;

  formattedErrors.devDependencies = devDependencyErrors.length
    ? _formatErrors('Dev Dependencies', devDependencyErrors)
    : devDependencyErrors;

  return formattedErrors;
}
function format(results) {
  if (_isFormatted(results)) {
    return results;
  }

  var dependencyErrors = results.dependencies || [];
  var devDependencyErrors = results.devDependencies || [];

  var formattedErrors = { };

  formattedErrors.dependencies = dependencyErrors.length
    ? _formatErrors('Dependencies', dependencyErrors)
    : dependencyErrors;

  formattedErrors.devDependencies = devDependencyErrors.length
    ? _formatErrors('Dev Dependencies', devDependencyErrors)
    : devDependencyErrors;

  return formattedErrors;
}
function format ( results ) { if ( _isFormatted ( results ) ) { return results ; } var dependencyErrors = results . dependencies || [ ] ; var devDependencyErrors = results . devDependencies || [ ] ; var formattedErrors = { } ; formattedErrors . dependencies = dependencyErrors . length ? _formatErrors ( 'Dependencies' , dependencyErrors ) : dependencyErrors ; formattedErrors . devDependencies = devDependencyErrors . length ? _formatErrors ( 'Dev Dependencies' , devDependencyErrors ) : devDependencyErrors ; return formattedErrors ; }
Formats an Object of results.

The Object should be of the same form as the result of
calling #validate, as the formatter expects the values
to be piped straight through.

@param results our Object containing validation results.
@returns {{dependencies: Array, devDependencies: Array}}.
Formats an Object of results .