MCPcopy Create free account
hub / github.com/Effect-TS/effect / modify

Function modify

packages/effect/src/unstable/http/Headers.ts:394–407  ·  view source on GitHub ↗
(key: string | RegExp)

Source from the content-addressed store, hash-verified

392 ): Record<string, string | Redacted.Redacted> => {
393 const out: Record<string, string | Redacted.Redacted> = { ...self }
394 const modify = (key: string | RegExp) => {
395 if (typeof key === "string") {
396 const k = key.toLowerCase()
397 if (k in self) {
398 out[k] = Redacted.make(self[k])
399 }
400 } else {
401 for (const name in self) {
402 if (key.test(name)) {
403 out[name] = Redacted.make(self[name])
404 }
405 }
406 }
407 }
408 if (Array.isArray(key)) {
409 for (let i = 0; i < key.length; i++) {
410 modify(key[i])

Callers 15

makeFunction · 0.70
fromWebFunction · 0.70
Headers.tsFile · 0.70
toIso.test.tsFile · 0.50
TxRef.tsFile · 0.50
getFunction · 0.50
Array.tsFile · 0.50
sizeFunction · 0.50
isEmptyFunction · 0.50
isNonEmptyFunction · 0.50
Chunk.tsFile · 0.50

Calls 1

makeMethod · 0.65

Tested by

no test coverage detected