diff --git a/dadi/lib/help.js b/dadi/lib/help.js index ae977827..ccbb83c5 100755 --- a/dadi/lib/help.js +++ b/dadi/lib/help.js @@ -17,8 +17,6 @@ const config = require(path.join(__dirname, '/../../config.js')) const Passport = require('@dadi/passport') const errorView = require(path.join(__dirname, '/view/errors')) -var self = this - module.exports.getVersion = function () { if (config.get('debug')) return version } @@ -245,14 +243,6 @@ module.exports.clearCache = function (req, Cache, callback) { }) } -/** - * Creates a URL/filename friendly version (slug) of any object that implements `toString()` - * @param {Object} input - object to be slugified - */ -module.exports.slugify = function (input) { - return require('underscore.string').slugify(input.toString()) -} - /** * Generates a filename for a token wallet file * @param {String} host - Issuer host @@ -260,13 +250,7 @@ module.exports.slugify = function (input) { * @param {String} clientId - Client ID */ module.exports.generateTokenWalletFilename = function (host, port, clientId) { - return ( - 'token.' + - self.slugify(host + port) + - '.' + - self.slugify(clientId) + - '.json' - ) + return `token.${host}${port}.${clientId}.json` } module.exports.getToken = function () { diff --git a/package.json b/package.json index 601f3028..bf4ecf27 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,6 @@ "snyk": "^1.47.0", "through": "~2.3.8", "toobusy-js": "~0.5.1", - "underscore.string": "~3.3.0", "wildcard": "~1.1.2" }, "devDependencies": {