register

fun register(convert: (Any) -> Any?)(source)

Teaches the table one more Kotlin type. convert answers anything the table already understands, a Map for instance, or null to let the next rule try. The first rule that answers wins. Rules apply to every engine. A chain that cycles or takes more than 256 transformations before reaching the built-in table throws JsEngineError.