Browse documentation

ensureIn

Checks whether a value belongs to an allowed collection.

Table of contents

Category

Value

Import

js
import { ensureIn } from "valyrian.js/utils";

Public signature

ts
<T>(value: T, allowed: readonly T[]): boolean

Parameters

ts
value: T, allowed: readonly T[]

Result

ts
boolean