Sha256: 1f27b5bd2ad2601730b85d1391a242604414a66026651d762179d5639b0b4c73

Contents?: true

Size: 1.54 KB

Versions: 57

Compression:

Stored size: 1.54 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isKeyword = isKeyword;
exports.isReservedWord = isReservedWord;
exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
exports.isStrictBindReservedWord = isStrictBindReservedWord;
exports.isStrictReservedWord = isStrictReservedWord;
const reservedWords = {
  keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  strictBind: ["eval", "arguments"]
};
const keywords = new Set(reservedWords.keyword);
const reservedWordsStrictSet = new Set(reservedWords.strict);
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
function isReservedWord(word, inModule) {
  return inModule && word === "await" || word === "enum";
}
function isStrictReservedWord(word, inModule) {
  return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
}
function isStrictBindOnlyReservedWord(word) {
  return reservedWordsStrictBindSet.has(word);
}
function isStrictBindReservedWord(word, inModule) {
  return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
}
function isKeyword(word) {
  return keywords.has(word);
}

//# sourceMappingURL=keyword.js.map

Version data entries

57 entries across 55 versions & 5 rubygems

Version Path
immosquare-cleaner-0.1.62 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.61 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.60 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.59 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.58 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.57 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.56 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.55 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.54 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.53 node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.52 node_modules/@babel/helper-validator-identifier/lib/keyword.js
trusty-cms-6.3.1 node_modules/@babel/helper-validator-identifier/lib/keyword.js
trusty-cms-6.3.1 node_modules/@babel/helper-function-name/node_modules/@babel/helper-validator-identifier/lib/keyword.js
trusty-cms-6.3.1 node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.50 node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js