Text
Modify
ReplaceString

Name

replaceString

Description

Takes a string (text) and a modifier and replaces the string $(text)$ in the modifier with the text field.

Example

index.ts

import { replaceString } from '@aigur/client';
//...
flow.node(replaceString, () => ({
text: 'Boopsy',
modifier: 'Hello $(text)$',
})) // --> {text: 'Hello Boopsy'}

Input

Property Type Required Description Default Value
text string | string[] Yes The text to be incorporated into the Modifier.
modifier string Yes A string that includes the substring $(text)$. The node will replace the substring with the value of the text property.

Output

Property Type
text string