MCPcopy Create free account
hub / github.com/denoland/std / isPrimitive

Function isPrimitive

assert/equal.ts:65–72  ·  view source on GitHub ↗
(x: unknown)

Source from the content-addressed store, hash-verified

63);
64
65function isPrimitive(x: unknown) {
66 return typeof x === "string" ||
67 typeof x === "number" ||
68 typeof x === "boolean" ||
69 typeof x === "bigint" ||
70 typeof x === "symbol" ||
71 x == null;
72}
73
74type TypedArray = Pick<Uint8Array | BigUint64Array, "length" | number>;
75const TypedArray = Object.getPrototypeOf(Uint8Array);

Callers 1

equalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected