import { isPrimitive } from "https://deno.land/x/unknownutil@v3.18.1/mod.ts";
Return true
if the type of x
is Primitive
.
import { is, Primitive } from "@core/unknownutil";
const a: unknown = 0;
if (is.Primitive(a)) {
// a is narrowed to Primitive
const _: Primitive = a;
}