Skip to content

isJust

isJust<T>(x): x is Just<T>

Checks if x is not Nothing.

Example

isJust(1234)
// => true
isJust("foobar")
// => true
isJust(Nothing)
// => false

Type Parameters

T

The type of value x.

Parameters

x

Maybe<T>

The value to check.

Returns

x is Just<T>

false if x is Nothing, true otherwise.

See

isNothing