MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / isAtLeastReact17

Function isAtLeastReact17

packages/react/src/error.ts:9–12  ·  view source on GitHub ↗
(reactVersion: string)

Source from the content-addressed store, hash-verified

7 * See if React major version is 17+ by parsing version string.
8 */
9export function isAtLeastReact17(reactVersion: string): boolean {
10 const reactMajor = reactVersion.match(/^([^.]+)/);
11 return reactMajor !== null && parseInt(reactMajor[0]) >= 17;
12}
13
14/**
15 * Recurse through `error.cause` chain to set cause on an error.

Callers 2

error.test.tsFile · 0.90
captureReactExceptionFunction · 0.85

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected