function
fun JsObject.function(name: String, arity: Int = 0, flags: PropertyFlags = PropertyFlags(enumerable = false), body: (List<JsValue>) -> Any?): JsFunction
A host function that takes the arguments as they came.
A one-argument host function, with the argument and the answer converted for you.
A two-argument host function.
inline fun <A, B, C, R> JsObject.function(name: String, crossinline body: (A, B, C) -> R): JsFunction
A three-argument host function.