MCPcopy Create free account
hub / github.com/expo/expo / transformString

Function transformString

tools/src/Transforms.ts:30–40  ·  view source on GitHub ↗
(
  input: string,
  transforms: StringTransform[] | null | undefined
)

Source from the content-addressed store, hash-verified

28 * Transforms input string according to the given transform rules.
29 */
30export function transformString(
31 input: string,
32 transforms: StringTransform[] | null | undefined
33): string {
34 if (!transforms) {
35 return input;
36 }
37 return transforms.reduce((acc, transform) => {
38 return applySingleTransform(acc, transform);
39 }, input);
40}
41
42async function applyTransformsOnFileContentAsync(
43 filePath: string,

Callers 2

transformFileAsyncFunction · 0.85

Calls 2

applySingleTransformFunction · 0.85
reduceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…