qmwts 1.1.63 → 1.1.65
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/class/local-date.d.ts +4 -0
- package/dist/class/local-date.js +16 -5
- package/dist/index.d.ts +15 -15
- package/dist/index.js +26 -27
- package/dist/utils/uuid-utils.d.ts +4 -0
- package/dist/utils/uuid-utils.js +11 -0
- package/package.json +1 -1
- package/dist/utils/axios-builder.d.ts +0 -2
- package/dist/utils/axios-builder.js +0 -18
|
@@ -9,7 +9,11 @@ export default class LocalDate {
|
|
|
9
9
|
getDayOfMonth(): number;
|
|
10
10
|
getDayOfWeek(): number;
|
|
11
11
|
plusDays(days: number): LocalDate;
|
|
12
|
+
plusMonths(months: number): LocalDate;
|
|
13
|
+
plusYears(years: number): LocalDate;
|
|
12
14
|
minusDays(days: number): LocalDate;
|
|
15
|
+
minusMonths(months: number): LocalDate;
|
|
16
|
+
minusYears(years: number): LocalDate;
|
|
13
17
|
format(): string;
|
|
14
18
|
toString(): string;
|
|
15
19
|
}
|
package/dist/class/local-date.js
CHANGED
|
@@ -29,18 +29,29 @@ class LocalDate {
|
|
|
29
29
|
plusDays(days) {
|
|
30
30
|
return LocalDate.of(this.getYear(), this.getMonth(), this.getDayOfMonth() + days);
|
|
31
31
|
}
|
|
32
|
+
plusMonths(months) {
|
|
33
|
+
return LocalDate.of(this.getYear(), this.getMonth() + months, this.getDayOfMonth());
|
|
34
|
+
}
|
|
35
|
+
plusYears(years) {
|
|
36
|
+
return LocalDate.of(this.getYear() + years, this.getMonth(), this.getDayOfMonth());
|
|
37
|
+
}
|
|
32
38
|
minusDays(days) {
|
|
33
39
|
return this.plusDays(-days);
|
|
34
40
|
}
|
|
41
|
+
minusMonths(months) {
|
|
42
|
+
return this.plusMonths(-months);
|
|
43
|
+
}
|
|
44
|
+
minusYears(years) {
|
|
45
|
+
return this.plusYears(-years);
|
|
46
|
+
}
|
|
35
47
|
format() {
|
|
36
48
|
return this.toString();
|
|
37
49
|
}
|
|
38
50
|
toString() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
].join('-');
|
|
51
|
+
const year = this.date.getFullYear();
|
|
52
|
+
const month = String(this.date.getMonth() + 1).padStart(2, '0');
|
|
53
|
+
const day = String(this.date.getDate()).padStart(2, '0');
|
|
54
|
+
return `${year}-${month}-${day}`;
|
|
44
55
|
}
|
|
45
56
|
}
|
|
46
57
|
exports.default = LocalDate;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
export type { XIRREntity } from './utils/finance-utils';
|
|
2
|
+
export type { PageVo } from './types/page-vo';
|
|
1
3
|
export { default as ArrayUtils } from './utils/array-utils';
|
|
2
4
|
export { default as FinanceUtils } from './utils/finance-utils';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import YearMonth from './class/year-month';
|
|
17
|
-
export { AxiosInstance, Downloader, Encryptor, NumberUtils, JsonUtils, ObjectUtils, PrototypeUtils, RequestDataGenerator, FileUtils, StringUtils, LocalDate, LocalDateTime, YearMonth, };
|
|
5
|
+
export { default as AxiosInstance } from './utils/axios-instance';
|
|
6
|
+
export { default as Downloader } from './utils/downloader';
|
|
7
|
+
export { default as Encryptor } from './utils/encryptor';
|
|
8
|
+
export { default as NumberUtils } from './utils/number-utils';
|
|
9
|
+
export { default as JsonUtils } from './utils/json-utils';
|
|
10
|
+
export { default as ObjectUtils } from './utils/object-utils';
|
|
11
|
+
export { default as PrototypeUtils } from './utils/prototype-utils';
|
|
12
|
+
export { default as RequestDataGenerator } from './utils/request-data-generator';
|
|
13
|
+
export { default as FileUtils } from './utils/file-utils';
|
|
14
|
+
export { default as StringUtils } from './utils/string-utils';
|
|
15
|
+
export { default as LocalDate } from './class/local-date';
|
|
16
|
+
export { default as LocalDateTime } from './class/local-date-time';
|
|
17
|
+
export { default as YearMonth } from './class/year-month';
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.YearMonth = exports.LocalDateTime = exports.LocalDate = exports.StringUtils = exports.FileUtils = exports.RequestDataGenerator = exports.PrototypeUtils = exports.ObjectUtils = exports.JsonUtils = exports.NumberUtils = exports.Encryptor = exports.Downloader = exports.AxiosInstance = exports.FinanceUtils = exports.ArrayUtils = void 0;
|
|
4
|
-
// https://www.jianshu.com/p/8fa2c50720e4
|
|
5
4
|
var array_utils_1 = require("./utils/array-utils");
|
|
6
5
|
Object.defineProperty(exports, "ArrayUtils", { enumerable: true, get: function () { return array_utils_1.default; } });
|
|
7
6
|
var finance_utils_1 = require("./utils/finance-utils");
|
|
8
7
|
Object.defineProperty(exports, "FinanceUtils", { enumerable: true, get: function () { return finance_utils_1.default; } });
|
|
9
|
-
|
|
10
|
-
exports
|
|
11
|
-
|
|
12
|
-
exports
|
|
13
|
-
|
|
14
|
-
exports
|
|
15
|
-
|
|
16
|
-
exports
|
|
17
|
-
|
|
18
|
-
exports
|
|
19
|
-
|
|
20
|
-
exports
|
|
21
|
-
|
|
22
|
-
exports
|
|
23
|
-
|
|
24
|
-
exports
|
|
25
|
-
|
|
26
|
-
exports
|
|
27
|
-
|
|
28
|
-
exports
|
|
29
|
-
|
|
30
|
-
exports
|
|
31
|
-
|
|
32
|
-
exports
|
|
33
|
-
|
|
34
|
-
exports
|
|
8
|
+
var axios_instance_1 = require("./utils/axios-instance");
|
|
9
|
+
Object.defineProperty(exports, "AxiosInstance", { enumerable: true, get: function () { return axios_instance_1.default; } });
|
|
10
|
+
var downloader_1 = require("./utils/downloader");
|
|
11
|
+
Object.defineProperty(exports, "Downloader", { enumerable: true, get: function () { return downloader_1.default; } });
|
|
12
|
+
var encryptor_1 = require("./utils/encryptor");
|
|
13
|
+
Object.defineProperty(exports, "Encryptor", { enumerable: true, get: function () { return encryptor_1.default; } });
|
|
14
|
+
var number_utils_1 = require("./utils/number-utils");
|
|
15
|
+
Object.defineProperty(exports, "NumberUtils", { enumerable: true, get: function () { return number_utils_1.default; } });
|
|
16
|
+
var json_utils_1 = require("./utils/json-utils");
|
|
17
|
+
Object.defineProperty(exports, "JsonUtils", { enumerable: true, get: function () { return json_utils_1.default; } });
|
|
18
|
+
var object_utils_1 = require("./utils/object-utils");
|
|
19
|
+
Object.defineProperty(exports, "ObjectUtils", { enumerable: true, get: function () { return object_utils_1.default; } });
|
|
20
|
+
var prototype_utils_1 = require("./utils/prototype-utils");
|
|
21
|
+
Object.defineProperty(exports, "PrototypeUtils", { enumerable: true, get: function () { return prototype_utils_1.default; } });
|
|
22
|
+
var request_data_generator_1 = require("./utils/request-data-generator");
|
|
23
|
+
Object.defineProperty(exports, "RequestDataGenerator", { enumerable: true, get: function () { return request_data_generator_1.default; } });
|
|
24
|
+
var file_utils_1 = require("./utils/file-utils");
|
|
25
|
+
Object.defineProperty(exports, "FileUtils", { enumerable: true, get: function () { return file_utils_1.default; } });
|
|
26
|
+
var string_utils_1 = require("./utils/string-utils");
|
|
27
|
+
Object.defineProperty(exports, "StringUtils", { enumerable: true, get: function () { return string_utils_1.default; } });
|
|
28
|
+
var local_date_1 = require("./class/local-date");
|
|
29
|
+
Object.defineProperty(exports, "LocalDate", { enumerable: true, get: function () { return local_date_1.default; } });
|
|
30
|
+
var local_date_time_1 = require("./class/local-date-time");
|
|
31
|
+
Object.defineProperty(exports, "LocalDateTime", { enumerable: true, get: function () { return local_date_time_1.default; } });
|
|
32
|
+
var year_month_1 = require("./class/year-month");
|
|
33
|
+
Object.defineProperty(exports, "YearMonth", { enumerable: true, get: function () { return year_month_1.default; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
uuid: function () {
|
|
5
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
6
|
+
var r = (Math.random() * 16) | 0;
|
|
7
|
+
var v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
8
|
+
return v.toString(16);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var axios_1 = require("axios");
|
|
4
|
-
axios_1.default.interceptors.request.use(function (request) {
|
|
5
|
-
console.log('request');
|
|
6
|
-
return request;
|
|
7
|
-
}, function (error) {
|
|
8
|
-
console.log('request error');
|
|
9
|
-
return Promise.reject(error);
|
|
10
|
-
});
|
|
11
|
-
axios_1.default.interceptors.response.use(function (response) {
|
|
12
|
-
console.log('response');
|
|
13
|
-
return response;
|
|
14
|
-
}, function (error) {
|
|
15
|
-
console.log('response error');
|
|
16
|
-
return Promise.reject(error);
|
|
17
|
-
});
|
|
18
|
-
exports.default = axios_1.default;
|