modules/validations/suspicious_name.js
// test if the name is just the key or tag value (e.g. "park")
test if the name is just the key or tag value
test if the name is just the key or tag value
function nameMatchesRawTag(lowercaseName, tags) {
    for (let i = 0; i < keysToTestForGenericValues.length; i++) {
      let key = keysToTestForGenericValues[i];
      let val = tags[key];
      if (val) {
        val = val.toLowerCase();
        if (key === lowercaseName ||
          val === lowercaseName ||
          key.replace(/\_/g, ' ') === lowercaseName ||
          val.replace(/\_/g, ' ') === lowercaseName) {
          return true;
        }
      }
    }
    return false;
  }
function nameMatchesRawTag ( lowercaseName , tags ) { for ( let i = 0 ; i < keysToTestForGenericValues . length ; i ++ ) { let key = keysToTestForGenericValues [ i ] ; let val = tags [ key ] ; if ( val ) { val = val . toLowerCase ( ) ; if ( key === lowercaseName || val === lowercaseName || key . replace ( / \_ / g , ' ' ) === lowercaseName || val . replace ( / \_ / g , ' ' ) === lowercaseName ) { return true ; } } } return false ; }
test if the name is just the key or tag value (e.g.
test if the name is just the key or tag value ( e . g .