An identifier mangler for which the output is invariant with respect to the source code.

interface SimpleIdentifierMangler {
    get(n): string;
}

Hierarchy (view full)

Methods

Methods

  • Obtains the nth most favored (usually shortest) identifier to rename a variable to. The mangler will increment n and retry until the return value is not in use in scope, and is not a reserved word. This function is expected to be stable; Evaluating get(n) === get(n) should always return true.

    Parameters

    • n: number

      The ordinal of the identifier.

    Returns string