From 9e53d3797e94885d104827f735a7a67c524570bc Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Thu, 8 Feb 2018 09:14:51 -0800 Subject: [PATCH] refactor: use Lodash template function Instead of bringing in an additional library, use the Lodash `template` function since the library is already used elsewhere in the project. --- lib/get-message.js | 4 ++-- package.json | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/get-message.js b/lib/get-message.js index b7e71045..6e751256 100644 --- a/lib/get-message.js +++ b/lib/get-message.js @@ -1,4 +1,4 @@ -const template = require('es6-template-strings') +const _ = require('lodash') module.exports = async function (commitMessages, key, values) { if (!Object.prototype.hasOwnProperty.call(commitMessages, key)) { @@ -7,5 +7,5 @@ module.exports = async function (commitMessages, key, values) { const templateValues = Object.assign({}, values) - return template(commitMessages[key], templateValues) + return _.template(commitMessages[key])(templateValues) } diff --git a/package.json b/package.json index 0e5199f3..2acb390e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "catbox-memory": "^2.0.4", "couchdb-bootstrap": "^1.14.0", "envalid": "^4.0.1", - "es6-template-strings": "^2.0.1", "escape-string-regexp": "^1.0.5", "github-url-from-git": "^1.4.0", "gk-log": "1.2.0",