Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
variable isPrimitive
import { isPrimitive } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Returns a boolean determining if the passed value is primitive or not.

Create an object from val and compare it with val to determine if the passed value is primitive (i.e. not equal to the created object).

type

(val: any) => unknown