Skip to content

Commit

Permalink
chore(deps): clean up rpad & node-md-config
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Sep 3, 2021
1 parent 30e7608 commit a1bad70
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 6,316 deletions.
4 changes: 1 addition & 3 deletions lib/SortieVariant.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

const rPad = require('right-pad');

/**
* Represents a sortie variant
*/
Expand Down Expand Up @@ -55,7 +53,7 @@ class SortieVariant {
* @returns {string}
*/
toString() {
return `${rPad(this.node, 25, ' ')} | ${rPad(this.modifier, 20, '')} | ${this.missionType}${this.mdConfig.lineEnd}`;
return `${this.node.padEnd(25, ' ')} | ${this.modifier.padEnd(20, ' ')} | ${this.missionType}${this.mdConfig.lineEnd}`;
}
}

Expand Down
3 changes: 1 addition & 2 deletions lib/WorldState.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const mdConfig = require('node-md-config');
const sortieData = require('warframe-worldstate-data').sortie;

const News = require('./News');
Expand Down Expand Up @@ -73,7 +72,7 @@ const defaultDeps = {
timeDate,
translator,
sortieData,
mdConfig,
mdConfig: new MarkdownSettings(),
locale: 'en',
logger: console,
};
Expand Down
20 changes: 17 additions & 3 deletions lib/supporting/MarkdownSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
* @property {string} codeLine - String for denoting in-line code
* @property {string} codeBlock - String for denoting multi-line code blocks
*/
class MarkdownSettings {}

module.exports = MarkdownSettings;
module.exports = class MarkdownSettings {
constructor() {
this.lineEnd = '\n';
this.blockEnd = '\n```';
this.doubleReturn = '\n\n';
this.linkBegin = '[';
this.linkMid = '](';
this.linkEnd = ')';
this.bold = '**';
this.italic = '*';
this.underline = '__';
this.strike = '~~';
this.codeLine = '`';
this.codeBlock = '```';
this.spoiler = '||';
}
};
Loading

0 comments on commit a1bad70

Please sign in to comment.