Skip to Content

@revideo/2d


@revideo/2d / code / replace

Function: replace()

replace(before, after): RawCodeFragment

Defined in: 2d/src/lib/code/CodeFragment.ts:77 

Create a code fragment that represents a change from one piece of code to another.

Parameters

before

string

The code to change from.

after

string

The code to change to.

Returns

RawCodeFragment

Remarks

Can be used in conjunction with code.CodeSignalHelpers.edit.

© 2026 Haven Technologies, Inc.
Function: replace() – Revideo