CodeQL library for JavaScript

Member predicate File::hasIndentation

Holds if line number lineno of this file is indented to depth d using character c.

This predicate only holds for lines that belong to JavaScript code that start with one or more occurrences of the same whitespace character, followed by at least one non-whitespace character.

It does not hold for lines that do not start with a whitespace character, or for lines starting with a string of different whitespace characters (for instance, a mix of tabs and spaces).

predicate hasIndentation(int lineno, string c, int d)