Constructors
- Error
= operation => type => message => Error
-
Used to collect errors in a
Left<Array<Error>>
-
Used to collect errors in a
- Lookup
= (datatype = "Json") => id => value => Lookup
-
Creates an HTML
data
element with thevalue
attribute set tovalue
and adata-type
attribute set to the datatype
-
Creates an HTML
- LookupTable
= (datatype = "Json") => id => table => LookupTable
-
Creates an HTML
data
element with thevalue
attribute set to theJSON
stringified value of the two-dimensional array,table
.
-
Creates an HTML
Lookup
This:
Lookup("Number")("baseRate")(0.00066)
Creates this:
{
"attributes": {
"class": "lookup",
"id": "baseRate",
"value": 0.00066
},
"dataset": {
"type": "Number"
},
"tag": "Data"
}
Which gets rendered to this:
<data
class="lookup"
id="baseRate"
value="0.00066"
data-type="Number"
></data>
LookupTable
LookupTable("Json")("someNumbers")("[[500000,0.94],[750000,0.975],[1000000,0.95]]")
Creates this:
{
"attributes": {
"class": "lookup-table",
"id": "someNumbers",
"value": "[[500000,0.94],[750000,0.975],[1000000,0.95]]"
},
"dataset": {
"type": "Json"
},
"tag": "Data"
}
Which gets rendered to this:
<data
class="lookup-table"
id="someNumbers"
value="[[500000,0.94],[750000,0.975],[1000000,0.95]]"
data-type="Json"
></data>