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

Function isInstanceOf

packages/core/src/utils/is.ts:189–195  ·  view source on GitHub ↗
(wat: any, base: any)

Source from the content-addressed store, hash-verified

187// TODO: fix in v11, convert any to unknown
188// export function isInstanceOf<T>(wat: unknown, base: { new (...args: any[]): T }): wat is T {
189export function isInstanceOf<T>(wat: any, base: any): wat is T {
190 try {
191 return wat instanceof base;
192 } catch {
193 return false;
194 }
195}
196
197/**
198 * Checks whether given value's type is a Vue ViewModel or a VNode.

Callers 8

is.test.tsFile · 0.90
isHeadersFunction · 0.90
isErrorFunction · 0.85
isEventFunction · 0.85
isElementFunction · 0.85
isRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected