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

x/is_what/dist/isInstanceOf.d.ts

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.
Latest
import * as isWhat from "https://deno.land/x/is_what@v5.0.2/dist/isInstanceOf.d.ts";

Functions

Checks if a value is an instance of a class or a class name. Useful when you want to check if a value is an instance of a class that may not be defined in the current scope. For example, if you want to check if a value is an OffscreenCanvas instance, you might not want to do the song and dance of using typeof OffscreenCanvas !== 'undefined' and then shimming OffscreenCanvas if the types aren't around.