Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/class.ts>isClass

A JavaScript extension package for building strong and modern applications.
Latest
function isClass
import { isClass } from "https://deno.land/x/ayonli_jsext@v0.9.72/class.ts";

Checks if a value is a class/constructor.

Examples

Example 1

import { isClass } from "@ayonli/jsext/class";

console.assert(isClass(class Foo { }));
console.assert(!isClass(function foo() { }));

Parameters

value: unknown

Returns

value is Constructor<any>