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

Function isSyntheticEvent

packages/core/src/utils/is.ts:175–177  ·  view source on GitHub ↗
(wat: unknown)

Source from the content-addressed store, hash-verified

173 * Use the equivalent helper that ships with `@sentry/react` instead.
174 */
175export function isSyntheticEvent(wat: unknown): boolean {
176 return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
177}
178
179/**
180 * Checks whether given value's type is an instance of provided constructor.

Callers

nothing calls this directly

Calls 1

isPlainObjectFunction · 0.70

Tested by

no test coverage detected