qmwts 1.1.64 → 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.
@@ -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
  }
@@ -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
- return [
40
- this.date.getFullYear().toString(),
41
- (this.date.getMonth() + 1).toString().padStart(2, '0'),
42
- this.date.getDate().toString().padStart(2, '0')
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
@@ -3,16 +3,15 @@ export type { PageVo } from './types/page-vo';
3
3
  export { default as ArrayUtils } from './utils/array-utils';
4
4
  export { default as FinanceUtils } from './utils/finance-utils';
5
5
  export { default as AxiosInstance } from './utils/axios-instance';
6
- import Downloader from './utils/downloader';
7
- import Encryptor from './utils/encryptor';
8
- import NumberUtils from './utils/number-utils';
9
- import JsonUtils from './utils/json-utils';
10
- import ObjectUtils from './utils/object-utils';
11
- import PrototypeUtils from './utils/prototype-utils';
12
- import RequestDataGenerator from './utils/request-data-generator';
13
- import FileUtils from './utils/file-utils';
14
- import StringUtils from './utils/string-utils';
15
- import LocalDate from './class/local-date';
16
- import LocalDateTime from './class/local-date-time';
17
- import YearMonth from './class/year-month';
18
- export { Downloader, Encryptor, NumberUtils, JsonUtils, ObjectUtils, PrototypeUtils, RequestDataGenerator, FileUtils, StringUtils, LocalDate, LocalDateTime, YearMonth, };
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
@@ -7,27 +7,27 @@ var finance_utils_1 = require("./utils/finance-utils");
7
7
  Object.defineProperty(exports, "FinanceUtils", { enumerable: true, get: function () { return finance_utils_1.default; } });
8
8
  var axios_instance_1 = require("./utils/axios-instance");
9
9
  Object.defineProperty(exports, "AxiosInstance", { enumerable: true, get: function () { return axios_instance_1.default; } });
10
- const downloader_1 = require("./utils/downloader");
11
- exports.Downloader = downloader_1.default;
12
- const encryptor_1 = require("./utils/encryptor");
13
- exports.Encryptor = encryptor_1.default;
14
- const number_utils_1 = require("./utils/number-utils");
15
- exports.NumberUtils = number_utils_1.default;
16
- const json_utils_1 = require("./utils/json-utils");
17
- exports.JsonUtils = json_utils_1.default;
18
- const object_utils_1 = require("./utils/object-utils");
19
- exports.ObjectUtils = object_utils_1.default;
20
- const prototype_utils_1 = require("./utils/prototype-utils");
21
- exports.PrototypeUtils = prototype_utils_1.default;
22
- const request_data_generator_1 = require("./utils/request-data-generator");
23
- exports.RequestDataGenerator = request_data_generator_1.default;
24
- const file_utils_1 = require("./utils/file-utils");
25
- exports.FileUtils = file_utils_1.default;
26
- const string_utils_1 = require("./utils/string-utils");
27
- exports.StringUtils = string_utils_1.default;
28
- const local_date_1 = require("./class/local-date");
29
- exports.LocalDate = local_date_1.default;
30
- const local_date_time_1 = require("./class/local-date-time");
31
- exports.LocalDateTime = local_date_time_1.default;
32
- const year_month_1 = require("./class/year-month");
33
- exports.YearMonth = year_month_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,4 @@
1
+ declare const _default: {
2
+ uuid(): string;
3
+ };
4
+ export default _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,6 +1,6 @@
1
1
  {
2
2
  "name": "qmwts",
3
- "version": "1.1.64",
3
+ "version": "1.1.65",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- import axios from 'axios';
2
- export default axios;
@@ -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;