Skip to content

Commit

Permalink
Add Handlebars helpers to support watermark; #11
Browse files Browse the repository at this point in the history
  • Loading branch information
redoPop committed Nov 28, 2017
1 parent e75cfd8 commit c583b7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/templates/helpers/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/*globals Buffer */

exports.eq = function (v1, v2) {
return v1 === v2;
};

exports.or = function (v1, v2) {
return v1 || v2;
};

exports.base64 = function (svg) {
return Buffer.from(svg).toString('base64');
}

exports.concat = function () {
return Array.prototype.slice.call(arguments, 0, -1).join('');
}

0 comments on commit c583b7f

Please sign in to comment.