CodeQL library for JavaScript
codeql/javascript-all 0.2.3 (changelog, source)
Search

Module CharacterEscapes

Import path

import semmle.javascript.CharacterEscapes

Predicates

getALikelyRegExpPatternMistake

Gets a character in src that is preceded by a single useless backslash, resulting in a likely regular expression mistake explained by mistake.

getAnEscapedCharacter

Gets the ith character of raw, which is preceded by an uneven number of backslashes.

getAnIdentityEscapedCharacter

Gets a character in n that is preceded by a single useless backslash.

hasALikelyRegExpPatternMistake

Holds if src likely contains a regular expression mistake, to be reported by js/useless-regexp-character-escape.