Module

Data.Foreign.NullOrUndefined

Package
purescript-foreign-generic
Repository
paf31/purescript-foreign-generic

#NullOrUndefined Source

newtype NullOrUndefined a

A newtype wrapper whose IsForeign instance correctly handles null and undefined values.

Conceptually, this type represents values which may be null or undefined.

Constructors

Instances

#unNullOrUndefined Source

unNullOrUndefined :: forall a. NullOrUndefined a -> Maybe a

Unwrap a NullOrUndefined value

#readNullOrUndefined Source

readNullOrUndefined :: forall a. (Foreign -> F a) -> Foreign -> F (NullOrUndefined a)

Read a NullOrUndefined value