expose asObject to precompile functiom

Allow precompilation to return a string instead of an object