Open devinus opened 8 years ago
Have a look at Handlebars.create(). I believe it does exactly that.
Handlebars.create() creates a new environment, but I'm looking for a method to clone an existing environment without setting up all it's helpers and partials and decorators again.
Sorry, I thought it would copy helpers and partials as well. But it doesn't.
This would allow us to register partials and helpers on a global instance and clone it to modify the environment for another use case.