(
inputString: string,
{ duration, filePath }: { duration?: boolean | undefined; filePath?: boolean | undefined } = {},
)
| 25 | } |
| 26 | |
| 27 | export 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() |
no outgoing calls