index.js
function(additionalRules, opts) {
  if (check(additionalRules).is('undefined')) {
    return true;
  }

  if (check(additionalRules).is.not('object')) {
    logger.warn('Provide an mapping of custom rules');
    return false;
  }

  _.each(additionalRules, function(rule, ruleName) {
    if (check(rule).is.not('function') || check(ruleName).is.not('string')) {
      logger.warn('Invalid custom rule provided');
      return;
    }

    rules[ruleName] = rule;
    opts[ruleName] = opts[ruleName] || true;
  });

  return true;
}
function(additionalRules, opts) {
  if (check(additionalRules).is('undefined')) {
    return true;
  }

  if (check(additionalRules).is.not('object')) {
    logger.warn('Provide an mapping of custom rules');
    return false;
  }

  _.each(additionalRules, function(rule, ruleName) {
    if (check(rule).is.not('function') || check(ruleName).is.not('string')) {
      logger.warn('Invalid custom rule provided');
      return;
    }

    rules[ruleName] = rule;
    opts[ruleName] = opts[ruleName] || true;
  });

  return true;
}
function ( additionalRules , opts ) { if ( check ( additionalRules ) . is ( 'undefined' ) ) { return true ; } if ( check ( additionalRules ) . is . not ( 'object' ) ) { logger . warn ( 'Provide an mapping of custom rules' ) ; return false ; } _ . each ( additionalRules , function ( rule , ruleName ) { if ( check ( rule ) . is . not ( 'function' ) || check ( ruleName ) . is . not ( 'string' ) ) { logger . warn ( 'Invalid custom rule provided' ) ; return ; } rules [ ruleName ] = rule ; opts [ ruleName ] = opts [ ruleName ] || true ; } ) ; return true ; }
/*
addRules

Add custom rules to the rule list and enable in the rule options hash.
/ * addRules