@ejfdelgado/ejflab-common 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ejfdelgado/ejflab-common",
3
3
  "type": "commonjs",
4
- "version": "1.4.0",
4
+ "version": "1.5.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ejfdelgado/ejflab-common.git"
@@ -130,6 +130,13 @@ class MyUtilities {
130
130
  second: str.replace(regex, () => copy.shift()[1]),
131
131
  }
132
132
  }
133
+
134
+ // MyUtilities.removeRepeatedSlash(
135
+ static removeRepeatedSlash(url) {
136
+ return url.replace(/^(https?:\/\/)(.*)$/g, (a, b, c) => {
137
+ return b + c.replace(/[/]{2,}/g, '/');
138
+ });
139
+ }
133
140
  }
134
141
 
135
142
  module.exports = {
@@ -10,7 +10,7 @@ class StepIsTrue extends StepBasic {
10
10
  class StepIsFalse extends StepBasic {
11
11
  async canContinue() {
12
12
  const result = this.args[0];
13
- return !!result;
13
+ return !!!result;
14
14
  }
15
15
  }
16
16