MCPcopy Index your code
hub / github.com/Effect-TS/effect / modify

Function modify

packages/platform/src/Headers.ts:208–221  ·  view source on GitHub ↗
(key: string | RegExp)

Source from the content-addressed store, hash-verified

206>(2, (self, key) => {
207 const out = make(self)
208 const modify = (key: string | RegExp) => {
209 if (typeof key === "string") {
210 const k = key.toLowerCase()
211 if (k in self) {
212 delete out[k]
213 }
214 } else {
215 for (const name in self) {
216 if (key.test(name)) {
217 delete out[name]
218 }
219 }
220 }
221 }
222 if (Array.isArray(key)) {
223 for (let i = 0; i < key.length; i++) {
224 modify(key[i])

Callers 5

Headers.tsFile · 0.70
Array.tsFile · 0.50
Chunk.tsFile · 0.50
incrementFunction · 0.50
metric.tsFile · 0.50

Calls 1

makeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…