CodeQL library for JavaScript
Search

Module DefensiveExpressionTest

Provides classes for specific kinds of defensive programming patterns.

Import path

import semmle.javascript.DefensiveProgramming

Classes

DefensiveInit

A defensive truthiness check that may be worth keeping, even if it is strictly speaking useless.

TypeofUndefinedTest

A test for undefined using a typeof expression.

UndefinedComparison

Comparison against undefined, such as x === undefined.