Module

FFI.Simple.Globals

Package
purescript-ffi-simple
Repository
garganscript/purescript-ffi-simple

#global Source

global :: forall t. String -> Maybe t

Looks up a name in globalThis, window or global depending on environment. NodeJS makes things available to a module without putting them in global, because it's shit, so don't expect much sense out of it in that environment.

#unsafeGlobal Source

unsafeGlobal :: forall t. String -> t

Like global, but for when you're really sure it exists and are willing to tolerate it being quietly undefined (or plan to use the Undef module functions)