toObject

fun toObject(scope: Scriptable, value: Any?): Scriptable


fun toObject(cx: Context, scope: Scriptable, value: Any?): Scriptable

ToObject: wraps a primitive in its object, and refuses null and undefined.