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
clapton-0.0.22 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.49 node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.6 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/@babel/helper-validator-identifier/lib/keyword.js