Skip to main content
Module

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

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

Replaces the characters from start to end with content. The same restrictions as s.remove() apply.

The fourth argument is optional. It can have a storeName property — if true, the original name will be stored for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well.

Parameters

start: number
end: number
content: string
optional
options: boolean | OverwriteOptions