@commercetools-frontend/url-utils 20.12.1 → 21.0.0
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.
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _typeof = require('@babel/runtime-corejs3/helpers/typeof');
|
|
6
5
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
7
6
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
8
7
|
|
|
@@ -12,7 +11,7 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
12
11
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
13
12
|
|
|
14
13
|
// NOTE: This string will be replaced on build time with the package version.
|
|
15
|
-
var version = "
|
|
14
|
+
var version = "21.0.0";
|
|
16
15
|
|
|
17
16
|
var matchLeadingAndTrailingSlashes = /^\/|\/$/g;
|
|
18
17
|
var trimLeadingAndTrailingSlashes = function trimLeadingAndTrailingSlashes(url) {
|
|
@@ -26,7 +25,7 @@ var joinPaths = function joinPaths() {
|
|
|
26
25
|
var joint = _mapInstanceProperty__default["default"](paths).call(paths, function (path) {
|
|
27
26
|
var _context;
|
|
28
27
|
|
|
29
|
-
if (typeof path !== 'string') throw new Error(_concatInstanceProperty__default["default"](_context = "Expected path \"".concat(path, "\" to be a \"string\", but got \"")).call(_context,
|
|
28
|
+
if (typeof path !== 'string') throw new Error(_concatInstanceProperty__default["default"](_context = "Expected path \"".concat(path, "\" to be a \"string\", but got \"")).call(_context, typeof path, "\"")); // Trim leading and trailing slash for each single path
|
|
30
29
|
|
|
31
30
|
return trimLeadingAndTrailingSlashes(path);
|
|
32
31
|
}).join('/');
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _typeof = require('@babel/runtime-corejs3/helpers/typeof');
|
|
6
5
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
7
6
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
8
7
|
|
|
@@ -12,7 +11,7 @@ var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstancePro
|
|
|
12
11
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
13
12
|
|
|
14
13
|
// NOTE: This string will be replaced on build time with the package version.
|
|
15
|
-
var version = "
|
|
14
|
+
var version = "21.0.0";
|
|
16
15
|
|
|
17
16
|
var matchLeadingAndTrailingSlashes = /^\/|\/$/g;
|
|
18
17
|
var trimLeadingAndTrailingSlashes = function trimLeadingAndTrailingSlashes(url) {
|
|
@@ -26,7 +25,7 @@ var joinPaths = function joinPaths() {
|
|
|
26
25
|
var joint = _mapInstanceProperty__default["default"](paths).call(paths, function (path) {
|
|
27
26
|
var _context;
|
|
28
27
|
|
|
29
|
-
if (typeof path !== 'string') throw new Error(_concatInstanceProperty__default["default"](_context = "Expected path \"".concat(path, "\" to be a \"string\", but got \"")).call(_context,
|
|
28
|
+
if (typeof path !== 'string') throw new Error(_concatInstanceProperty__default["default"](_context = "Expected path \"".concat(path, "\" to be a \"string\", but got \"")).call(_context, typeof path, "\"")); // Trim leading and trailing slash for each single path
|
|
30
29
|
|
|
31
30
|
return trimLeadingAndTrailingSlashes(path);
|
|
32
31
|
}).join('/');
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _typeof from '@babel/runtime-corejs3/helpers/esm/typeof';
|
|
2
1
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
3
2
|
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
4
3
|
|
|
5
4
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "
|
|
5
|
+
var version = "21.0.0";
|
|
7
6
|
|
|
8
7
|
var matchLeadingAndTrailingSlashes = /^\/|\/$/g;
|
|
9
8
|
var trimLeadingAndTrailingSlashes = function trimLeadingAndTrailingSlashes(url) {
|
|
@@ -17,7 +16,7 @@ var joinPaths = function joinPaths() {
|
|
|
17
16
|
var joint = _mapInstanceProperty(paths).call(paths, function (path) {
|
|
18
17
|
var _context;
|
|
19
18
|
|
|
20
|
-
if (typeof path !== 'string') throw new Error(_concatInstanceProperty(_context = "Expected path \"".concat(path, "\" to be a \"string\", but got \"")).call(_context,
|
|
19
|
+
if (typeof path !== 'string') throw new Error(_concatInstanceProperty(_context = "Expected path \"".concat(path, "\" to be a \"string\", but got \"")).call(_context, typeof path, "\"")); // Trim leading and trailing slash for each single path
|
|
21
20
|
|
|
22
21
|
return trimLeadingAndTrailingSlashes(path);
|
|
23
22
|
}).join('/');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/url-utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "Utility functions to work with URLs",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "dist/commercetools-frontend-url-utils.esm.js",
|
|
19
19
|
"files": ["dist", "package.json", "LICENSE", "README.md"],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@babel/runtime": "7.16.
|
|
22
|
-
"@babel/runtime-corejs3": "7.16.
|
|
21
|
+
"@babel/runtime": "^7.16.7",
|
|
22
|
+
"@babel/runtime-corejs3": "^7.16.8"
|
|
23
23
|
}
|
|
24
24
|
}
|