ReplaceOptions: {
    iterationLimit?: number;
    once?: boolean;
    recursive?: boolean;
}

Type declaration

  • OptionaliterationLimit?: number

    If iterationLimit > 1, the rules will be repeatedly applied until no rules apply, up to maxIterations times.

    Note that if once is true, maxIterations has no effect.

    Default: 1

  • Optionalonce?: boolean

    If true, stop after the first rule that matches.

    If false, apply all the remaining rules even after the first match.

    Default: true

  • Optionalrecursive?: boolean

    If true, apply replacement rules to all sub-expressions. If false, only consider the top-level expression.

    Default: true