on 79a747c help sign in
elk/libraries/JavaScript.elm
43 lines 609 B history raw
2module JavaScript where
4import Native.JavaScript as JS
6-- To Elm
8toString : JSString -> String
9toString = JS.toString
11toInt : JSNumber -> Int
12toInt = JS.toInt
14toFloat : JSNumber -> Float
15toFloat = JS.id
17toBool : JSBool -> Bool
18toBool = JS.id
20toList : JSArray a -> [a]
21toList = JS.toList
23toRecord = JS.toRecord
26-- From Elm
28fromString : String -> JSString
29fromString = JS.fromString
31fromInt : Int -> JSNumber
32fromInt = JS.id
34fromFloat : Float -> JSNumber
35fromFloat = JS.id
37fromBool : Bool -> JSBool
38fromBool = JS.id
40fromList : [a] -> JSArray a
41fromList = JS.fromList
43fromRecord = JS.fromRecord