Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 855x 22x 22x 22x 11x 11x 11x 11x 11x 11x 11x 11x 22x 22x 844x 844x 844x | /** @import { Expression, BinaryExpression } from 'estree' */ /** @import { ComponentContext } from '../types' */ import { dev } from '../../../../state.js'; import * as b from '../../../../utils/builders.js'; /** * @param {BinaryExpression} node * @param {ComponentContext} context */ export function BinaryExpression(node, context) { if (dev) { const operator = node.operator; if (operator === '===' || operator === '!==') { return b.call( '$.strict_equals', /** @type {Expression} */ (context.visit(node.left)), /** @type {Expression} */ (context.visit(node.right)), operator === '!==' && b.literal(false) ); } if (operator === '==' || operator === '!=') { return b.call( '$.equals', /** @type {Expression} */ (context.visit(node.left)), /** @type {Expression} */ (context.visit(node.right)), operator === '!=' && b.literal(false) ); } } context.next(); } |