Skip to content

Commit

Permalink
refactor: use Lodash template function
Browse files Browse the repository at this point in the history
Instead of bringing in an additional library, use the Lodash `template`
function since the library is already used elsewhere in the project.
  • Loading branch information
Arcanemagus committed Feb 8, 2018
1 parent 6a4fae5 commit 9e53d37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/get-message.js
Original file line number Diff line number Diff line change
@@ -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)) {
Expand All @@ -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)
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9e53d37

Please sign in to comment.