@react-pakistan/util-functions 1.24.56 → 1.24.57

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.
@@ -11,11 +11,9 @@
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.urlToSentenceCase = void 0;
13
13
  var urlToSentenceCase = function (url) {
14
- var chunks = url.split('/');
14
+ var _a, _b;
15
+ var chunks = url === null || url === void 0 ? void 0 : url.split('/');
15
16
  var pageName = chunks[chunks.length - 1];
16
- return pageName
17
- .split('-')
18
- .map(function (_str) { return _str.charAt(0).toUpperCase() + _str.slice(1); })
19
- .join(' ');
17
+ return (_b = (_a = pageName === null || pageName === void 0 ? void 0 : pageName.split('-')) === null || _a === void 0 ? void 0 : _a.map(function (_str) { return _str.charAt(0).toUpperCase() + _str.slice(1); })) === null || _b === void 0 ? void 0 : _b.join(' ');
20
18
  };
21
19
  exports.urlToSentenceCase = urlToSentenceCase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.56",
3
+ "version": "1.24.57",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {