jsdom-extras-0.1.0.0: Convenience utilities for JSDOM
Safe HaskellSafe-Inferred
LanguageHaskell2010

JSDOM.Extras.Object

Description

 
Synopsis

Documentation

singleton :: (ToJSObject a b, MonadJSM m) => a -> b -> m Object Source #

Turn a single key, value pair into a javascript object

toObject :: (MonadJSM m, ToJSObject a b) => [(a, b)] -> m Object Source #

Turn a set of key, value pairs into a javascript object

fromObject :: MonadJSM m => Object -> m [(JSString, JSVal)] Source #

Turns a javascript Object into a list of keys and values

doNothing :: JSCallAsFunction Source #

A function that does nothing

lookup :: MonadJSM m => JSString -> Object -> m (Maybe JSVal) Source #

Lookup a key in an object. Treats both nulls and undefineds as Nothing

toMaybe :: MonadJSM m => JSVal -> m (Maybe JSVal) Source #

Wraps a javascript value in Maybe, treating undefined and null as Nothing