MCPcopy Create free account
hub / github.com/netlify/cli / normalize

Function normalize

tests/integration/utils/snapshots.ts:27–38  ·  view source on GitHub ↗
(
  inputString: string,
  { duration, filePath }: { duration?: boolean | undefined; filePath?: boolean | undefined } = {},
)

Source from the content-addressed store, hash-verified

25}
26
27export const normalize = (
28 inputString: string,
29 { duration, filePath }: { duration?: boolean | undefined; filePath?: boolean | undefined } = {},
30) =>
31 [
32 ...baseNormalizers,
33 duration ? optionalNormalizers.duration : undefined,
34 filePath ? optionalNormalizers.filePath : undefined,
35 ]
36 .filter((normalizer) => normalizer !== undefined)
37 .reduce((acc, { pattern, value }) => acc.replace(pattern, value), inputString)
38 .trim()

Callers 8

normalizeSnapshotFunction · 0.85
envelope.test.tsFile · 0.85
didyoumean.test.tsFile · 0.85
recipes.test.tsFile · 0.85
env.test.tsFile · 0.85
help.test.tsFile · 0.85

Calls

no outgoing calls

Tested by 1

normalizeSnapshotFunction · 0.68