qmwts 1.1.49 → 1.1.51
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/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/utils/string-utils.d.ts +5 -0
- package/dist/utils/string-utils.js +17 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ export type { XIRREntity } from './utils/finance-utils';
|
|
|
4
4
|
import Downloader from './utils/downloader';
|
|
5
5
|
import NumberUtils from './utils/number-utils';
|
|
6
6
|
import JsonUtils from './utils/json-utils';
|
|
7
|
-
import UUIDUtils from './utils/uuid-utils';
|
|
8
7
|
import PrototypeUtils from './utils/prototype-utils';
|
|
9
8
|
import RequestDataGenerator from './utils/request-data-generator';
|
|
10
9
|
import FileUtils from './utils/file-utils';
|
|
10
|
+
import StringUtils from './utils/string-utils';
|
|
11
11
|
import LocalDate from './class/local-date';
|
|
12
12
|
import LocalDateTime from './class/local-date-time';
|
|
13
13
|
import YearMonth from './class/year-month';
|
|
14
|
-
export { Downloader, NumberUtils, JsonUtils,
|
|
14
|
+
export { Downloader, NumberUtils, JsonUtils, PrototypeUtils, RequestDataGenerator, FileUtils, StringUtils, LocalDate, LocalDateTime, YearMonth, };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.YearMonth = exports.LocalDateTime = exports.LocalDate = exports.
|
|
3
|
+
exports.YearMonth = exports.LocalDateTime = exports.LocalDate = exports.StringUtils = exports.FileUtils = exports.RequestDataGenerator = exports.PrototypeUtils = exports.JsonUtils = exports.NumberUtils = exports.Downloader = exports.FinanceUtils = exports.ArrayUtils = void 0;
|
|
4
4
|
// https://www.jianshu.com/p/8fa2c50720e4
|
|
5
5
|
var array_utils_1 = require("./utils/array-utils");
|
|
6
6
|
Object.defineProperty(exports, "ArrayUtils", { enumerable: true, get: function () { return array_utils_1.default; } });
|
|
@@ -12,14 +12,14 @@ var number_utils_1 = require("./utils/number-utils");
|
|
|
12
12
|
exports.NumberUtils = number_utils_1.default;
|
|
13
13
|
var json_utils_1 = require("./utils/json-utils");
|
|
14
14
|
exports.JsonUtils = json_utils_1.default;
|
|
15
|
-
var uuid_utils_1 = require("./utils/uuid-utils");
|
|
16
|
-
exports.UUIDUtils = uuid_utils_1.default;
|
|
17
15
|
var prototype_utils_1 = require("./utils/prototype-utils");
|
|
18
16
|
exports.PrototypeUtils = prototype_utils_1.default;
|
|
19
17
|
var request_data_generator_1 = require("./utils/request-data-generator");
|
|
20
18
|
exports.RequestDataGenerator = request_data_generator_1.default;
|
|
21
19
|
var file_utils_1 = require("./utils/file-utils");
|
|
22
20
|
exports.FileUtils = file_utils_1.default;
|
|
21
|
+
var string_utils_1 = require("./utils/string-utils");
|
|
22
|
+
exports.StringUtils = string_utils_1.default;
|
|
23
23
|
var local_date_1 = require("./class/local-date");
|
|
24
24
|
exports.LocalDate = local_date_1.default;
|
|
25
25
|
var local_date_time_1 = require("./class/local-date-time");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
trimAll: function (str) {
|
|
5
|
+
if ([void 0, null].includes(str))
|
|
6
|
+
return '';
|
|
7
|
+
return String(str).split('').map(function (e) { return e.trim(); }).join('');
|
|
8
|
+
},
|
|
9
|
+
uuid: function (withDash) {
|
|
10
|
+
if (withDash === void 0) { withDash = false; }
|
|
11
|
+
return ['xxxxxxxx', 'xxxx', '4xxx', 'yxxx', 'xxxxxxxxxxxx'].join(withDash ? '-' : '').replace(/[xy]/g, function (c) {
|
|
12
|
+
var r = (Math.random() * 16) | 0;
|
|
13
|
+
var v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
14
|
+
return v.toString(16);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
};
|