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

Function isPrimitive

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

Source from the content-addressed store, hash-verified

105 * @returns A boolean representing the result.
106 */
107export function isPrimitive(wat: unknown): wat is Primitive {
108 return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');
109}
110
111/**
112 * Checks whether given value's type is an object literal, or a class instance.

Callers 12

is.test.tsFile · 0.90
captureMessageFunction · 0.90
safeJoinConsoleArgsFunction · 0.90
objectifyFunction · 0.90
safeJoinFunction · 0.90

Calls 1

isParameterizedStringFunction · 0.85

Tested by

no test coverage detected