CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.1.1-dev (changelog, source)
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

A comparison against undefined, such as x === undefined.