expose asObject to precompile function

Allow precompilation to return a string instead of an object