create Lua object in js
infrastructure to handle different return types from js