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

Function isReserved

lib/web/jshint.js:15311–15337  ·  view source on GitHub ↗
(token, isProperty)

Source from the content-addressed store, hash-verified

15309
15310
15311 function isReserved(token, isProperty) {
15312 if (!token.reserved) {
15313 return false;
15314 }
15315 var meta = token.meta;
15316
15317 if (meta && meta.isFutureReservedWord && state.inES5()) {
15318 // ES3 FutureReservedWord in an ES5 environment.
15319 if (!meta.es5) {
15320 return false;
15321 }
15322
15323 // Some ES5 FutureReservedWord identifiers are active only
15324 // within a strict mode environment.
15325 if (meta.strictOnly) {
15326 if (!state.option.strict && !state.isStrict()) {
15327 return false;
15328 }
15329 }
15330
15331 if (isProperty) {
15332 return false;
15333 }
15334 }
15335
15336 return true;
15337 }
15338
15339 // Produce a token object.
15340 var create = function(type, value, isProperty, token) {

Callers 6

jshint.jsFile · 0.85
prefixFunction · 0.85
checkLeftSideAssignFunction · 0.85
suffixFunction · 0.85
optionalidentifierFunction · 0.85
statementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected