expensify-common 2.0.85 → 2.0.87
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/dist/str.js +8 -0
- package/package.json +2 -2
package/dist/str.js
CHANGED
|
@@ -23,6 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
__setModuleDefault(result, mod);
|
|
24
24
|
return result;
|
|
25
25
|
};
|
|
26
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
+
};
|
|
26
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
30
|
/* eslint-disable no-control-regex */
|
|
28
31
|
const awesome_phonenumber_1 = require("awesome-phonenumber");
|
|
@@ -30,6 +33,7 @@ const HtmlEntities = __importStar(require("html-entities"));
|
|
|
30
33
|
const Constants = __importStar(require("./CONST"));
|
|
31
34
|
const UrlPatterns = __importStar(require("./Url"));
|
|
32
35
|
const Utils = __importStar(require("./utils"));
|
|
36
|
+
const Log_1 = __importDefault(require("./Log"));
|
|
33
37
|
const REMOVE_SMS_DOMAIN_PATTERN = /@expensify\.sms/gi;
|
|
34
38
|
function resultFn(parameter, ...args) {
|
|
35
39
|
if (typeof parameter === 'function') {
|
|
@@ -909,6 +913,10 @@ const Str = {
|
|
|
909
913
|
*/
|
|
910
914
|
getExtension(url) {
|
|
911
915
|
var _a, _b;
|
|
916
|
+
if (typeof url !== 'string') {
|
|
917
|
+
Log_1.default.warn('Str.getExtension: url is not a string', { url });
|
|
918
|
+
return undefined;
|
|
919
|
+
}
|
|
912
920
|
return (_b = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.split('?')[0]) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
913
921
|
},
|
|
914
922
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expensify-common",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.87",
|
|
4
4
|
"author": "Expensify, Inc.",
|
|
5
5
|
"description": "Expensify libraries and components shared across different repos",
|
|
6
6
|
"homepage": "https://expensify.com",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"babel-jest": "^29.0.0",
|
|
57
57
|
"babelify": "10.0.0",
|
|
58
58
|
"eslint": "^8.57.0",
|
|
59
|
-
"eslint-config-expensify": "^2.0.
|
|
59
|
+
"eslint-config-expensify": "^2.0.58",
|
|
60
60
|
"eslint-config-prettier": "^8.10.0",
|
|
61
61
|
"eslint-plugin-jest": "^28.6.0",
|
|
62
62
|
"eslint-plugin-prettier": "^5.2.1",
|