Skip to main content
Module

x/aleph/server/deps.ts>MagicString#indent

The Full-stack Framework in Deno.
Very Popular
Go to Latest
method MagicString.prototype.indent
import { MagicString } from "https://deno.land/x/aleph@1.0.0-beta.1/server/deps.ts";

Prefixes each line of the string with prefix. If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.

Parameters

optional
options: IndentOptions

Prefixes each line of the string with prefix. If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.

The options argument can have an exclude property, which is an array of [start, end] character ranges. These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.

Parameters

optional
indentStr: string
optional
options: IndentOptions