replace
Replaces occurrences of strings in a given string based on a replacements map.
Import:
import { replace } from 'obsidian-dev-utils/string';Signature:
function replace($string: string, replacementsMap: Record<string, string>): stringParameters:
| Parameter | Type | Description |
|---|---|---|
$string | string | |
replacementsMap | Record<string, string> | An object mapping strings to their replacement values. |
Returns: string — The modified string with replacements applied.