CodeQL queries 1.24

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Finds expressions of the form `e % 2 === 0`

import javascript

from StrictEqExpr eq, ModExpr mod, NumberLiteral zero, NumberLiteral two
where two.getValue() = "2" and mod.getRightOperand() = two and
      zero.getValue() = "0" and eq.hasOperands(mod, two)
select eq

  • No labels