MCPcopy
hub / github.com/vitest-dev/vitest / isPrimitive

Function isPrimitive

packages/utils/src/helpers.ts:53–57  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

51}
52
53export function isPrimitive(value: unknown): boolean {
54 return (
55 value === null || (typeof value !== 'function' && typeof value !== 'object')
56 )
57}
58
59export function slash(path: string): string {
60 return path.replace(/\\/g, '/')

Callers 3

parseErrorStacktraceFunction · 0.90
syncUpdateStacksMethod · 0.90
printErrorInnerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected