Skip to main content
Module

x/bundler/deps.ts>terser.SimpleIdentifierMangler

A Bundler with the web in mind.
Latest
interface terser.SimpleIdentifierMangler
import { type terser } from "https://deno.land/x/bundler@0.9.0/deps.ts";
const { SimpleIdentifierMangler } = terser;

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

Methods

get(n: number): string

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.