MCPcopy Create free account
hub / github.com/bernaferrari/FigmaToCode / replaceAllUtil

Function replaceAllUtil

packages/backend/src/common/numToAutoFixed.ts:87–88  ·  view source on GitHub ↗
(str: string, find: string, replace: string)

Source from the content-addressed store, hash-verified

85}
86
87export const replaceAllUtil = (str: string, find: string, replace: string) =>
88 str.replace(new RegExp(escapeRegExp(find), "g"), replace);
89
90export function stringToClassName(name: string): string {
91 const words = name.split(/[^a-zA-Z0-9]+/);

Callers

nothing calls this directly

Calls 1

escapeRegExpFunction · 0.85

Tested by

no test coverage detected