(s, o, g)
| 7073 | return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); |
| 7074 | }; |
| 7075 | var itself = function(s, o, g) { |
| 7076 | var i, k, x, reIgnoreStr, reIgnore; |
| 7077 | var optionKeys; |
| 7078 | var newOptionObj = {}; |
| 7079 | var newIgnoredObj = {}; |
| 7080 | |
| 7081 | o = _.clone(o); |
| 7082 | state.reset(); |
| 7083 | |
| 7084 | if (o && o.scope) { |
| 7085 | JSHINT.scope = o.scope; |
| 7086 | } else { |
| 7087 | JSHINT.errors = []; |
| 7088 | JSHINT.undefs = []; |
| 7089 | JSHINT.internals = []; |
| 7090 | JSHINT.blacklist = {}; |
| 7091 | JSHINT.scope = "(main)"; |
| 7092 | } |
| 7093 | |
| 7094 | predefined = Object.create(null); |
| 7095 | combine(predefined, vars.ecmaIdentifiers[3]); |
| 7096 | combine(predefined, vars.reservedVars); |
| 7097 | |
| 7098 | combine(predefined, g || {}); |
| 7099 | |
| 7100 | declared = Object.create(null); |
| 7101 | exported = Object.create(null); |
| 7102 | |
| 7103 | function each(obj, cb) { |
| 7104 | if (!obj) |
| 7105 | return; |
| 7106 | |
| 7107 | if (!Array.isArray(obj) && typeof obj === "object") |
| 7108 | obj = Object.keys(obj); |
| 7109 | |
| 7110 | obj.forEach(cb); |
| 7111 | } |
| 7112 | |
| 7113 | if (o) { |
| 7114 | each(o.predef || null, function(item) { |
| 7115 | var slice, prop; |
| 7116 | |
| 7117 | if (item[0] === "-") { |
| 7118 | slice = item.slice(1); |
| 7119 | JSHINT.blacklist[slice] = slice; |
| 7120 | delete predefined[slice]; |
| 7121 | } else { |
| 7122 | prop = Object.getOwnPropertyDescriptor(o.predef, item); |
| 7123 | predefined[item] = prop ? prop.value : false; |
| 7124 | } |
| 7125 | }); |
| 7126 | |
| 7127 | each(o.exported || null, function(item) { |
| 7128 | exported[item] = true; |
| 7129 | }); |
| 7130 | |
| 7131 | delete o.predef; |
| 7132 | delete o.exported; |
nothing calls this directly
no test coverage detected