Adding new handlebars helper


I’ve defined new handlebars helper (that test if a variable is equal to some value) in core/server/helpers and registered it index.js. However, it is required to add it to gscan specs. Is it possible to do it through some command or do I have to modify the file directly by adding that helper in node_modules/gscan/lib/specs/v1.js?



You need to modify the file in node_modules

For what it’s worth, most of the time people look for an equality operator, they end up being able to use something like the has helper. If you share your use case, someone might be able to help you figure out a way to get the functionality you’re looking for without modifying the core :slight_smile:


Thank you for the answer.

I want to check if the variable @site.lang is equal to en or not.

closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.