CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.15-dev (changelog, source)
Search

Module Util

Provides general-purpose utility predicates.

Import path

import semmle.javascript.Util

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

capitalize

Gets the capitalization of s.

describeExpression

Gets a string that describes e.

pluralize

Gets the pluralization for n occurrences of noun.

truncate

Gets str or a truncated version of str with explanation appended if its length exceeds maxLength.