isSome
Option.isSome
returns whether or not the Option
is a Some
.
Option<T>.isSome = () => boolean;
Example
const carson = find(people, person => person.name === "Carson")
if (carson.isSome()) {
console.log("We found Carson");
} else {
console.log("We didn't find Carson");
}