Safe Haskell | None |
---|---|
Language | Haskell98 |
Dealing with JavaScript objects on a low, low level.
- type JSObj = Maybe JSAny
- data Type
- (#) :: JSLookup a => a -> JSString -> IO JSObj
- asString :: JSObj -> IO (Maybe JSString)
- asBool :: JSObj -> IO (Maybe Bool)
- asNumber :: JSObj -> IO (Maybe Double)
- typeOf :: JSObj -> IO Type
- lookupPath :: JSObj -> [JSString] -> IO JSObj
- toObject :: [(JSString, JSAny)] -> JSAny
Documentation
Possible types of JS objects.
(#) :: JSLookup a => a -> JSString -> IO JSObj infixl 4 Source
Look up a property on an object-like value.
lookupPath :: JSObj -> [JSString] -> IO JSObj Source
Lookup a whole path at once. More efficient for long paths.
x
is equivalent to lookupPath
["a", "b"]x.a.b
.