Idris2Doc : JS.Object

JS.Object

(source)
A Javascript `Object` is primarily a mapping from string
to values, and we can use them exactly as such. However,
objects can also be used as an intermediary representation
for encoding data from and to JSON.

This module therefore provides additional functionality:

A linear `LinObject` data type for encoding nested datastructure
into an intermediary object representation, and an immutable
`IObject` data type, mainly for decoding data, but also as an efficient
means for having an immutable string to data mapping.

Definitions

data Object : Type
Totality: total
Visibility: export
Hints:
FromFFI Object Object
JSType Object
ToFFI Object Object
record LinObject : Type
  Objects, mutable in a linear context. Useful for
efficient, non-monadic encoding of Idris2 values,
for instance to be used in an FFI call to an external
function, or when encoding Idris2 values to JSON through
the Javascript `JSON.stringify` function.

Totality: total
Visibility: export
Constructor: 
MkLinObject : Object -> LinObject

Projection: 
.obj : LinObject -> Object
newObj : (1 _ : ((1 _ : LinObject) -> a)) -> a
Totality: total
Visibility: export
thaw : (1 _ : LinObject) -> IO Object
Totality: total
Visibility: export
lset : (1 _ : LinObject) -> String -> a -> LinObject
Totality: total
Visibility: export
lget : (1 _ : LinObject) -> String -> Res AnyPtr (const LinObject)
Totality: total
Visibility: export
record IObject : Type
Totality: total
Visibility: export
Constructor: 
MkIObject : Object -> IObject

Projection: 
.obj : IObject -> Object
freeze : (1 _ : LinObject) -> IObject
Totality: total
Visibility: export
get : SafeCast a => IObject -> String -> Maybe a
Totality: total
Visibility: export
data Value : Type
Totality: total
Visibility: public export
Constructors:
Arr : IArray Value -> Value
Boolean : Bool -> Value
Null : Value
Num : Double -> Value
Obj : IObject -> Value
Str : String -> Value
stringify : Value -> String
Totality: total
Visibility: export
obj : (1 _ : LinObject) -> Value
Totality: total
Visibility: export
lsetVal : (1 _ : LinObject) -> String -> Value -> LinObject
Totality: total
Visibility: export
withPairs : List (String, Value) -> ((1 _ : LinObject) -> a) -> a
Totality: total
Visibility: export
pairs : List (String, Value) -> Value
Totality: total
Visibility: export
vals : List Value -> Value
Totality: total
Visibility: export
parse : String -> Either JSErr Value
Totality: total
Visibility: export
parseMaybe : String -> Maybe Value
Totality: total
Visibility: export
getObject : Value -> Maybe IObject
Totality: total
Visibility: export
getBool : Value -> Maybe Bool
Totality: total
Visibility: export
getStr : Value -> Maybe String
Totality: total
Visibility: export
getNum : Value -> Maybe Double
Totality: total
Visibility: export
getArray : Value -> Maybe (IArray Value)
Totality: total
Visibility: export
valueAt : IObject -> String -> Maybe Value
Totality: total
Visibility: export