code: function throwErrorOnUndefinedColumnName(keys, extract) {
      var regexRefs = /([a-zA-Z$_][\w$]+)(\s*\.\s*[a-zA-Z$_][\w$]+)*/g, // identifier[.identifier]...
          parts, variable;
  
      keys = keys.concat(['true', 'false']);
  
      // search for variable references, excluding property references (with dot operator prefix)
      while ((parts = regexRefs.exec(extract))) {
          variable = parts[1];
          if (keys.indexOf(variable) < 0) {
              throw new ReferenceError(variable + ' not defined.');
          }
      }
  }
docs: Throws ReferenceError on unknown variable (including global object and properties thereof)