deepStringReplace

Function

Iterate over an object graph, and for all string properties, search for a string, and replace it with another string

  • deepStringReplace(obj: Record<stringany>, stringOrRegex: string | RegExp, replacement: string) : Record<stringany>

Parameters

Parameter Type Default Notes
obj Required Record<stringany>
stringOrRegex Required string | RegExp
replacement Required string

Returns

Record<stringany>

Function defined in common/src/objects/deep-string-replace.ts:7