Skip to content

Commit

Permalink
Accommodate numbers as values. Closes #30
Browse files Browse the repository at this point in the history
  • Loading branch information
curran committed Sep 15, 2020
1 parent cf04e0a commit d77b13a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit d77b13a

Please sign in to comment.