diff --git a/src/templates/helpers/index.js b/src/templates/helpers/index.js index 23dc0e3..626285d 100644 --- a/src/templates/helpers/index.js +++ b/src/templates/helpers/index.js @@ -1,3 +1,5 @@ +/*globals Buffer */ + exports.eq = function (v1, v2) { return v1 === v2; }; @@ -5,3 +7,11 @@ exports.eq = function (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(''); +}