2module JavaScript.Experimental where
6-- Turn arbitrary JavaScript objects into Elm records.
7-- Arrays are converted into lists, nested objects are allowed.
8-- No `null` values or non-homogeneous arrays.
11-- { student:"Steve", scores:[83,94,99,72] }
12-- { errorLevel:10, critical:true }
16-- { info:[true,42,'what'] }
17toRecord : JSObject -> a
20-- Turn arbitrary Elm records into JavaScript objects.
21-- Lists become arrays, nested records are allowed. No ADTs.
24-- { student="Steve", scores=[83,94,99,72] }
25-- { errorLevel=10, critical=True }
28-- { answer = Nothing }
29-- { result = Left "An error occurred" }
30fromRecord : a -> JSObject
31fromRecord = JS.fromRecord
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list