Checks whether the optional opt contains x value.
opt
x
The value to check.
Whether x is contained.
const hasTwo = contains(2);expect(hasTwo(some(2))).toStrictEqual(true);expect(hasTwo(some(3))).toStrictEqual(false);expect(hasTwo(none())).toStrictEqual(false); Copy
const hasTwo = contains(2);expect(hasTwo(some(2))).toStrictEqual(true);expect(hasTwo(some(3))).toStrictEqual(false);expect(hasTwo(none())).toStrictEqual(false);
Checks whether the optional
optcontainsxvalue.