diff --git a/packages/browser-utils/src/getNativeImplementation.ts b/packages/browser-utils/src/getNativeImplementation.ts index e06fb69f561e..6da58bfba623 100644 --- a/packages/browser-utils/src/getNativeImplementation.ts +++ b/packages/browser-utils/src/getNativeImplementation.ts @@ -1,4 +1,4 @@ -import { logger } from '@sentry/utils'; +import { isNativeFunction, logger } from '@sentry/utils'; import { DEBUG_BUILD } from './debug-build'; import { WINDOW } from './types'; @@ -15,14 +15,6 @@ interface CacheableImplementations { const cachedImplementations: Partial = {}; -/** - * isNative checks if the given function is a native implementation - */ -// eslint-disable-next-line @typescript-eslint/ban-types -function isNative(func: Function): boolean { - return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); -} - /** * Get the native implementation of a browser function. * @@ -43,7 +35,7 @@ export function getNativeImplementation