keen/js
SourceContains functions for JavaScript primitive operations.
js-any builtinsubscript js-any(a js-any, key js-any) js, unsafeGets a property from a JS object. For a function call use
call or call-property.call js-any(a js-any) js, unsafea() WARN: This does not await the result. WARN: subscript followed by call may not work. Use call-property instead.call js-any(a js-any, arg0 js-any, arg1 js-any, arg2 js-any, arg3 js-any) js, unsafea(arg0, arg1, arg2, arg3)call-property js-any(a js-any, name js-any, arg0 js-any, arg1 js-any, arg2 js-any) js, unsafea[name](arg0, arg1, arg2)call-property js-any(a js-any, name js-any, arg0 js-any, arg1 js-any, arg2 js-any, arg3 js-any) js, unsafea[name](arg0, arg1, arg2, arg3)eval js-any(source js-any) js, unsafeCalls JavaScript's 'eval' function. 'source' should be JavaScript source code. This could be useful for making use of JS features that don't have a Keen analog, or if you just have a big chunk of JS code and don't have time to translate it to Keen.
This happens in its own scope, so don't count on anything being in the enclosing scope. Instead, eval a function literal, then call it, like "x => f(x)".eval call x. If appropriate, remember to make the function async and await the result.
to js-any[](a js-any) unsafe, jsreinterpret-cast the value as an array. Unsafe because the input may be mutable.