Skip to content

Commit

Permalink
Updated syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
electerious committed Apr 22, 2018
1 parent 03d334a commit eb6c399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(str, data, delimiter = [ '{{ ', ' }}' ]) {
Object.keys(data).forEach((key, i) => {

const regexp = new RegExp(delimiter[0] + key + delimiter[1], 'g')
const value = typeof data[key]==='function' ? data[key](key, i, data, str) : data[key]
const value = typeof data[key] === 'function' ? data[key](key, i, data, str) : data[key]

str = str.replace(regexp, value)

Expand Down

0 comments on commit eb6c399

Please sign in to comment.