Skip to content

Commit b1a88a3

Browse files
committed
add unless_eq helper
1 parent 52393f3 commit b1a88a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/generate.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Handlebars.registerHelper('if_eq', function (a, b, opts) {
1414
: opts.inverse(this)
1515
})
1616

17+
Handlebars.registerHelper('unless_eq', function (a, b, opts) {
18+
return a === b
19+
? opts.inverse(this)
20+
: opts.fn(this)
21+
})
22+
1723
/**
1824
* Generate a template given a `src` and `dest`.
1925
*

0 commit comments

Comments
 (0)