MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / omit

Function omit

packages/node-core/src/proxy/index.ts:207–223  ·  view source on GitHub ↗
(
  obj: T,
  ...keys: K
)

Source from the content-addressed store, hash-verified

205}
206
207function omit<T extends object, K extends [...(keyof T)[]]>(
208 obj: T,
209 ...keys: K
210): {
211 [K2 in Exclude<keyof T, K[number]>]: T[K2];
212} {
213 const ret = {} as {
214 [K in keyof typeof obj]: (typeof obj)[K];
215 };
216 let key: keyof typeof obj;
217 for (key in obj) {
218 if (!keys.includes(key)) {
219 ret[key] = obj[key];
220 }
221 }
222 return ret;
223}

Callers 2

constructorMethod · 0.85
connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected