perf: Use strict equals

This commit is contained in:
Daniel Tschinder
2019-01-15 13:13:58 -08:00
parent 8df0500f55
commit 0370af58f1
5 changed files with 8 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ export default class StatementParser extends ExpressionParser {
this.next();
let result;
if (starttype == tt._import) {
if (starttype === tt._import) {
result = this.parseImport(node);
if (
@@ -693,9 +693,9 @@ export default class StatementParser extends ExpressionParser {
node.body = this.parseStatement(declaration);
if (
node.body.type == "ClassDeclaration" ||
(node.body.type == "VariableDeclaration" && node.body.kind !== "var") ||
(node.body.type == "FunctionDeclaration" &&
node.body.type === "ClassDeclaration" ||
(node.body.type === "VariableDeclaration" && node.body.kind !== "var") ||
(node.body.type === "FunctionDeclaration" &&
(this.state.strict || node.body.generator || node.body.async))
) {
this.raise(node.body.start, "Invalid labeled declaration");