function isOneOf
isOneOf(values: readonly string[]): ((value: string | undefined) => boolean)

Ask whether a value is one of a fixed list: isOneOf(["a", "b"])("a") is true. Curried, so a list of words becomes one named check.

Parameters

values: readonly string[]

Return Type

((value: string | undefined) => boolean)

Usage

import { isOneOf } from "doc.ts";