helpers.js
362 Bytes
'use strict';
import _ from 'lodash';
const helpers = {
equals: (a, b, opts) => {
if (a === b) {
return opts.fn(this);
} else {
return opts.inverse(this);
}
},
replace: (str, pattern, replacement) => {
return _.replace(str, new RegExp(pattern), replacement);
}
};
export default helpers;