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

x/is_what/dist/index.js>isOneOf

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.
Latest
function isOneOf
import { isOneOf } from "https://deno.land/x/is_what@v5.0.2/dist/index.js";

A factory function that creates a function to check if the payload is one of the given types.

Examples

import { isOneOf, isNull, isUndefined } from 'is-what'

const isNullOrUndefined = isOneOf(isNull, isUndefined)

isNullOrUndefined(null) // true isNullOrUndefined(undefined) // true isNullOrUndefined(123) // false