Module Util

Provides general-purpose utility predicates.

Import path

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.