MCPcopy Create free account
hub / github.com/TanStack/cli / normalizeParamKey

Function normalizeParamKey

packages/cli/src/telemetry.ts:67–74  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

65}
66
67function normalizeParamKey(key: string) {
68 const normalized = key.replace(/[^a-zA-Z0-9_]/g, '_').replace(/^_+/, '')
69 const prefixed = /^[a-zA-Z]/.test(normalized)
70 ? normalized
71 : `p_${normalized || 'value'}`
72
73 return prefixed.slice(0, 40)
74}
75
76function normalizeParamValue(value: unknown): number | string | undefined {
77 if (value === undefined || value === null) {

Callers 1

Calls 2

testMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected