(s, o, g)
| 7819 | return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); |
| 7820 | }; |
| 7821 | var itself = function(s, o, g) { |
| 7822 | var i, k, x, reIgnoreStr, reIgnore; |
| 7823 | var optionKeys; |
| 7824 | var newOptionObj = {}; |
| 7825 | var newIgnoredObj = {}; |
| 7826 | |
| 7827 | o = _.clone(o); |
| 7828 | state.reset(); |
| 7829 | |
| 7830 | if (o && o.scope) { |
| 7831 | JSHINT.scope = o.scope; |
| 7832 | } else { |
| 7833 | JSHINT.errors = []; |
| 7834 | JSHINT.undefs = []; |
| 7835 | JSHINT.internals = []; |
| 7836 | JSHINT.blacklist = {}; |
| 7837 | JSHINT.scope = "(main)"; |
| 7838 | } |
| 7839 | |
| 7840 | predefined = Object.create(null); |
| 7841 | combine(predefined, vars.ecmaIdentifiers[3]); |
| 7842 | combine(predefined, vars.reservedVars); |
| 7843 | |
| 7844 | combine(predefined, g || {}); |
| 7845 | |
| 7846 | declared = Object.create(null); |
| 7847 | var exported = Object.create(null); // Variables that live outside the current file |
| 7848 | |
| 7849 | function each(obj, cb) { |
| 7850 | if (!obj) |
| 7851 | return; |
| 7852 | |
| 7853 | if (!Array.isArray(obj) && typeof obj === "object") |
| 7854 | obj = Object.keys(obj); |
| 7855 | |
| 7856 | obj.forEach(cb); |
| 7857 | } |
| 7858 | |
| 7859 | if (o) { |
| 7860 | each(o.predef || null, function(item) { |
| 7861 | var slice, prop; |
| 7862 | |
| 7863 | if (item[0] === "-") { |
| 7864 | slice = item.slice(1); |
| 7865 | JSHINT.blacklist[slice] = slice; |
| 7866 | delete predefined[slice]; |
| 7867 | } else { |
| 7868 | prop = Object.getOwnPropertyDescriptor(o.predef, item); |
| 7869 | predefined[item] = prop ? prop.value : false; |
| 7870 | } |
| 7871 | }); |
| 7872 | |
| 7873 | each(o.exported || null, function(item) { |
| 7874 | exported[item] = true; |
| 7875 | }); |
| 7876 | |
| 7877 | delete o.predef; |
| 7878 | delete o.exported; |
nothing calls this directly
no test coverage detected