@thi.ng/router 3.1.4 → 3.1.5

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-03-11T12:13:49Z
3
+ - **Last updated**: 2022-04-07T14:17:30Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.1.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.1.5) (2022-04-07)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - replace deprecated .substr() w/ .substring() ([0710509](https://github.com/thi-ng/umbrella/commit/0710509))
17
+
12
18
  ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/router@3.1.0) (2021-11-17)
13
19
 
14
20
  #### 🚀 Features
package/basic.js CHANGED
@@ -51,9 +51,9 @@ let BasicRouter = class BasicRouter {
51
51
  */
52
52
  route(src) {
53
53
  if (src.charAt(0) === "#") {
54
- src = src.substr(1);
54
+ src = src.substring(1);
55
55
  }
56
- src = src.substr(this.config.prefix.length);
56
+ src = src.substring(this.config.prefix.length);
57
57
  let match = this.matchRoutes(src);
58
58
  if (!match) {
59
59
  if (!this.handleRouteFailure()) {
@@ -97,7 +97,7 @@ let BasicRouter = class BasicRouter {
97
97
  this.config.prefix +
98
98
  route.match
99
99
  .map((x) => x.charAt(0) === "?"
100
- ? (x = params[x.substr(1)]) != null
100
+ ? (x = params[x.substring(1)]) != null
101
101
  ? x
102
102
  : "NULL"
103
103
  : x)
@@ -127,7 +127,7 @@ let BasicRouter = class BasicRouter {
127
127
  for (let i = 0; i < n; i++) {
128
128
  const m = match[i];
129
129
  if (m.charAt(0) === "?") {
130
- params[m.substr(1)] = curr[i];
130
+ params[m.substring(1)] = curr[i];
131
131
  }
132
132
  else if (curr[i] !== m) {
133
133
  return;
package/history.js CHANGED
@@ -83,7 +83,7 @@ export class HTMLRouter extends BasicRouter {
83
83
  this.hashHandler ||
84
84
  ((e) => {
85
85
  if (!this.ignoreHashChange) {
86
- const hash = e.newURL.substr(e.newURL.indexOf("#"));
86
+ const hash = e.newURL.substring(e.newURL.indexOf("#"));
87
87
  if (hash !== this.currentPath) {
88
88
  this.route(hash, false);
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/router",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "Generic router for browser & non-browser based applications",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,15 +34,15 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.3.4",
38
- "@thi.ng/checks": "^3.1.4",
39
- "@thi.ng/equiv": "^2.1.4",
40
- "@thi.ng/errors": "^2.1.4",
37
+ "@thi.ng/api": "^8.3.5",
38
+ "@thi.ng/checks": "^3.1.5",
39
+ "@thi.ng/equiv": "^2.1.5",
40
+ "@thi.ng/errors": "^2.1.5",
41
41
  "tslib": "^2.3.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "^7.19.4",
45
- "@thi.ng/testament": "^0.2.4",
45
+ "@thi.ng/testament": "^0.2.5",
46
46
  "rimraf": "^3.0.2",
47
47
  "tools": "^0.0.1",
48
48
  "typedoc": "^0.22.13",
@@ -72,16 +72,16 @@
72
72
  ],
73
73
  "exports": {
74
74
  ".": {
75
- "import": "./index.js"
75
+ "default": "./index.js"
76
76
  },
77
77
  "./api": {
78
- "import": "./api.js"
78
+ "default": "./api.js"
79
79
  },
80
80
  "./basic": {
81
- "import": "./basic.js"
81
+ "default": "./basic.js"
82
82
  },
83
83
  "./history": {
84
- "import": "./history.js"
84
+ "default": "./history.js"
85
85
  }
86
86
  },
87
87
  "thi.ng": {
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "year": 2014
93
93
  },
94
- "gitHead": "0fc692a3225c068aacafdc4cb6140cf603c67ad8\n"
94
+ "gitHead": "5ee1feb590dd935593b1dd4e7f38a3ed3ba64765\n"
95
95
  }