Skip to main content
Module

x/deno2node/src/deps.deno.ts>Node#replaceWithText

Compile your Deno project to run on Node.js.
Go to Latest
method Node.prototype.replaceWithText
import { Node } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.ts";

Replaces the text of the current node with new text.

This will forget the current node and return a new node that can be asserted or type guarded to the correct type.

Parameters

textOrWriterFunction: string | WriterFunction
  • Text or writer function to replace with.

Returns

The new node.