expose asObject to precompile function

expose the pre-existing functionality to precompile as an object/string
Merge pull request #4097 from kingpin2k/exposeAsObject

expose asObject to precompile function