From d77b13acfafa92050399f33bdc32b59610b80c44 Mon Sep 17 00:00:00 2001 From: Curran Kelleher Date: Tue, 15 Sep 2020 16:31:55 -0400 Subject: [PATCH] Accommodate numbers as values. Closes #30 --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 3e9cdb7..e212558 100644 --- a/index.js +++ b/index.js @@ -104,6 +104,11 @@ const parseString = (() => { return null; } + // Accommodate numbers as values. + if (matches.length === 1 && str.startsWith('{{') && str.endsWith('}}')) { + return value; + } + return str.replace(match, value); }, str); };