# package:jsaddle

Call a JavaScript function
>>> testJSaddle $ eval "'Hello World'.indexOf('World')"
6

>>> testJSaddle $ val "Hello World" # "indexOf" $ ["World"]
6
Call a JavaScript function
>>> testJSaddle $ eval "something = {}; something[6]=function (x) {return x.length;}; something[6]('World')"
5

>>> testJSaddle $ jsg "something" ## 6 $ ["World"]
5
Stream the UTF-8-like packed encoding used by GHC to represent constant strings in generated code. This encoding uses the byte sequence "xc0x80" to represent NUL, and the string is NUL-terminated. Properties
unstream . streamCString# addr# = unpackCString# addr#
Set a JavaScript property
>>> testJSaddle $ eval "var j = {}; j.x = 1; j.x"
1

>>> testJSaddle $ do {j <- obj; (j <# "x") 1; j!"x"}
1
Set a JavaScript property
>>> testJSaddle $ eval "var j = {}; j[6] = 1; j[6]"
1

>>> testJSaddle $ do {j <- obj; (j <## 6) 1; j!!6}
1