deligenius / view-engine

🚀A Template View Engine for Deno frameworks
MIT License
54 stars 15 forks source link

A way to access Handlebars class for registering custom helper functions? #22

Closed tinkajts closed 3 years ago

tinkajts commented 3 years ago

Hi, Is there a way to register helper functions on the handlebars-engine?

Like the example:

Handlebars.registerHelper('reverseWord', function(value){ var reversedWord = value.split("").reverse().join(""); return reveredWord; });

https://jonathanmh.com/handlebars-custom-helpers-chaining/

gjuoun commented 3 years ago

Will lool into that later today

gjuoun commented 3 years ago

Done. Please use v1.4.5 see https://github.com/deligenius/view-engine#use-handlebarsregisterhelper

tinkajts commented 3 years ago

This works like a charm! Splendid work :+1: Many thanks.