function _isChakraLoad(path) { // 'WScript.LoadScriptFile' used by Chakra. // TODO(ochang): The optional second argument can change semantics ("self", // "samethread", "crossthread" etc). // Investigate whether if it still makes sense to include them. return (babelTypes.isMemberExpression(path.node.callee) && babelTypes.isIdentifier(path.node.callee.property) && path.node.callee.property.name == 'LoadScriptFile' && path.node.arguments.length >= 1 && babelTypes.isStringLiteral(path.node.arguments[0])); }
function _isV8OrSpiderMonkeyLoad(path) { // 'load' and 'loadRelativeToScript' used by V8 and SpiderMonkey. return (babelTypes.isIdentifier(path.node.callee) && (path.node.callee.name == 'load' || path.node.callee.name == 'loadRelativeToScript') && path.node.arguments.length == 1 && babelTypes.isStringLiteral(path.node.arguments[0])); }
if (t.isStringLiteral(node)) { return node.value;
if (babelTypes.isStringLiteral(path.node.left.property) && !propertyNames.has(path.node.left.property.value)) {