(options: BrowserOptions)
| 13 | * Inits the React SDK |
| 14 | */ |
| 15 | export function init(options: BrowserOptions): Client | undefined { |
| 16 | const opts = { |
| 17 | ...options, |
| 18 | }; |
| 19 | |
| 20 | applySdkMetadata(opts, 'react'); |
| 21 | setContext('react', { version }); |
| 22 | const client = browserInit(opts); |
| 23 | |
| 24 | // Add react-specific stringification |
| 25 | setNormalizeStringifier(normalizeStringifyValue); |
| 26 | |
| 27 | return client; |
| 28 | } |
| 29 | |
| 30 | function normalizeStringifyValue(value: Exclude<unknown, string | number | boolean | null>): string | undefined { |
| 31 | if (isSyntheticEvent(value)) { |
no test coverage detected