lib/validators/spec.js
function checkForDuplicates (params) {
  for (var i = 0; i < params.length - 1; i++) {
    var outer = params[i];
    for (var j = i + 1; j < params.length; j++) {
      var inner = params[j];
      if (outer.name === inner.name && outer.in === inner.in) {
        throw ono.syntax('Validation failed. Found multiple %s parameters named "%s"', outer.in, outer.name);
      }
    }
  }
}
function checkForDuplicates (params) {
  for (var i = 0; i < params.length - 1; i++) {
    var outer = params[i];
    for (var j = i + 1; j < params.length; j++) {
      var inner = params[j];
      if (outer.name === inner.name && outer.in === inner.in) {
        throw ono.syntax('Validation failed. Found multiple %s parameters named "%s"', outer.in, outer.name);
      }
    }
  }
}
function checkForDuplicates ( params ) { for ( var i = 0 ; i < params . length - 1 ; i ++ ) { var outer = params [ i ] ; for ( var j = i + 1 ; j < params . length ; j ++ ) { var inner = params [ j ] ; if ( outer . name === inner . name && outer . in === inner . in ) { throw ono . syntax ( 'Validation failed. Found multiple %s parameters named "%s"' , outer . in , outer . name ) ; } } } }
Checks the given parameter list for duplicates, and throws an error if found.

@param   {object[]}  params  - An array of Parameter objects
Checks the given parameter list for duplicates and throws an error if found .