keen/js

Source
Contains functions for JavaScript primitive operations.
js-any builtin
js-global js-any() js, global, unsafe
'self' in the browser or 'global' in node.js
subscript js-any(a js-any, key js-any) js, unsafe
Gets a property from a JS object. For a function call use call or call-property.
set-subscript void(a js-any, key js-any, value js-any) js, unsafe
Sets a property on a JS object.
call js-any(a js-any) js, unsafe
a() 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, arg js-any) js, unsafe
a(arg)
call js-any(a js-any, arg0 js-any, arg1 js-any) js, unsafe
a(arg0, arg1)
call js-any(a js-any, arg0 js-any, arg1 js-any, arg2 js-any) js, unsafe
a(arg0, arg1, arg2)
call js-any(a js-any, arg0 js-any, arg1 js-any, arg2 js-any, arg3 js-any) js, unsafe
a(arg0, arg1, arg2, arg3)
call-new js-any(a js-any) js, unsafe
new a()
call-new js-any(a js-any, arg js-any) js, unsafe
new a(arg)
call-new js-any(a js-any, arg0 js-any, arg1 js-any) js, unsafe
new a(arg0, arg1)
call-new js-any(a js-any, arg0 js-any, arg1 js-any, arg2 js-any) js, unsafe
new a(arg0, arg1, arg2)
call-property js-any(a js-any, name js-any) js, unsafe
a[name]()
call-property js-any(a js-any, name js-any, arg js-any) js, unsafe
a[name](arg)
call-property js-any(a js-any, name js-any, arg0 js-any, arg1 js-any) js, unsafe
a[name](arg0, arg1)
call-property js-any(a js-any, name js-any, arg0 js-any, arg1 js-any, arg2 js-any) js, unsafe
a[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, unsafe
a[name](arg0, arg1, arg2, arg3)
call-property-spread js-any(a js-any, name js-any, args js-any[]) js, unsafe
a[name](...args)
null js-any() js
undefined js-any() js
await js-any(a js-any) js, unsafe
typeof js-any(a js-any) js, unsafe
== bool(a js-any, b js-any) js, unsafe
This is actually JavaScript's === operator.
instanceof bool(a js-any, b js-any) js, unsafe
+ js-any(a js-any, b js-any) js, unsafe
eval js-any(source js-any) js, unsafe

Calls 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.

js-import js-any(name js-any) js, global, unsafe
to void(a js-any) js
to js-any(a void) js
to bool(a js-any) js
to js-any(a bool) js
false js-any() js
true js-any() js
to js-any(a void mut(void)) js
to js-any(a void mut(js-any)) js
to js-any(a js-any mut(void)) js
to js-any(a js-any mut(js-any)) js
to js-any(a void mut((js-any, js-any))) js
to js-any(a js-any mut((js-any, js-any))) js
to js-any(a float32) js
to float32(a js-any) js
to js-any(a float64) js
to float64(a js-any) js
to js-any(a int32) js
to int32(a js-any) js
to js-any(a int64) js
to int64(a js-any) js
to js-any(a nat32) js
to nat32(a js-any) js
to js-any(a nat64) js
to nat64(a js-any) js
to string(a js-any) js
to js-any(a string) js
to js-any(a int8[]) unsafe, js
reinterpret-cast as an Int8Array. Unsafe because that is mutable.
to js-any(a int16[]) unsafe, js
reinterpret-cast as an Int16Array. Unsafe because that is mutable.
to js-any(a int32[]) unsafe, js
reinterpret-cast as an Int32Array. Unsafe because that is mutable.
to js-any(a int64[]) unsafe, js
reinterpret-cast as an Int64Array. Unsafe because that is mutable.
to js-any(a nat8[]) unsafe, js
reinterpret-cast as a Uint8Array. Unsafe because that is mutable.
to js-any(a nat16[]) unsafe, js
reinterpret-cast as a Uint16Array. Unsafe because that is mutable.
to js-any(a nat32[]) unsafe, js
reinterpret-cast as a Uint32Array. Unsafe because that is mutable.
to js-any(a nat64[]) unsafe, js
reinterpret-cast as a Uint64Array. Unsafe because that is mutable.
to int8[](a js-any) unsafe, js
Requires an Int8Array
to int16[](a js-any) unsafe, js
Requires an Int16Array
to int32[](a js-any) unsafe, js
Requires an Int32Array
to int64[](a js-any) unsafe, js
Requires an Int64Array
to nat8[](a js-any) unsafe, js
Requires a Uint8Array
to nat16[](a js-any) unsafe, js
Requires a Uint16Array
to nat32[](a js-any) unsafe, js
Requires a Uint32Array
to nat64[](a js-any) unsafe, js
Requires a Uint64Array
to js-any(a js-any[]) unsafe, js
reinterpret-cast as a JS array. Unsafe because that is mutable.
to js-any[](a js-any) unsafe, js
reinterpret-cast the value as an array. Unsafe because the input may be mutable.