function includesValue
includesValue<T>(record: Readonly<Record<string, T>>,value: T): booleanIf the given value is part of the given object it returns true, otherwise it returns false. Doesn't work with non-primitive values: includesValue({x: {}}, {}) returns false.
Examples
Example 1
Example 1
import { includesValue } from "@std/collections/includes_value"; import { assertEquals } from "@std/assert/assert_equals"; const input = { first: 33, second: 34, }; assertEquals(includesValue(input, 34), true);
Type Parameters
T