MCPcopy Index your code
hub / github.com/cameri/nostream / maskSecretValue

Function maskSecretValue

src/cli/utils/env-config.ts:205–215  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

203}
204
205export const maskSecretValue = (value: string): string => {
206 if (!value) {
207 return '***'
208 }
209
210 if (value.length <= 4) {
211 return '*'.repeat(value.length)
212 }
213
214 return `${value.slice(0, 2)}***${value.slice(-2)}`
215}

Callers 2

runConfigEnvListFunction · 0.90
runConfigEnvGetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected