MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / isTypoTypeof

Function isTypoTypeof

lib/web/jshint.js:20203–20218  ·  view source on GitHub ↗
(left, right, state)

Source from the content-addressed store, hash-verified

20201 // value. For docs on 'typeof' see:
20202 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
20203 function isTypoTypeof(left, right, state) {
20204 var values;
20205
20206 if (state.option.notypeof)
20207 return false;
20208
20209 if (!left || !right)
20210 return false;
20211
20212 values = state.inES6() ? typeofValues.es6 : typeofValues.es3;
20213
20214 if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)")
20215 return !_.contains(values, left.value);
20216
20217 return false;
20218 }
20219
20220 function isGlobalEval(left, state) {
20221 var isGlobal = false;

Callers 1

jshint.jsFile · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected