From 4362246d638fcfca58b05a583cf1175af3e19a3f Mon Sep 17 00:00:00 2001 From: Sergii Azizov <33128587+sergii-azizov@users.noreply.github.com> Date: Mon, 12 Feb 2018 16:17:54 +0200 Subject: [PATCH] Update templater.js --- templater.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templater.js b/templater.js index 4acab6a..9e1f7f6 100644 --- a/templater.js +++ b/templater.js @@ -1,5 +1,5 @@ function templater(templateString, dataObj) { - return templateString.replace(/\$\{(\w+)\}/g, "$1") + return templateString.replace(/\$\{(\w+)\}/g, (a, b) => dataObj[b]) } templater('${who} ${action} ${what}', {