light-h5-core-lib 2.7.4 → 2.8.0
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/LightCore.js +44 -38
- package/common/base/BaseSingleton.js +23 -23
- package/common/base/IClear.js +2 -2
- package/common/base/IDestroy.js +2 -2
- package/common/md5/MD5.js +346 -346
- package/common/util/BeizerUtil.js +83 -83
- package/common/util/BitUtil.js +43 -43
- package/common/util/Crc32Util.js +35 -0
- package/common/util/CryptUtil.js +4 -2
- package/common/util/DateUtil.js +89 -89
- package/common/util/FloatDigitUtil.js +22 -22
- package/common/util/PromiseUtil.js +74 -0
- package/common/util/RandomNumUtil.js +54 -40
- package/common/util/StringUtil.js +81 -81
- package/common/util/UniqueIDUtil.js +21 -21
- package/package.json +16 -18
- package/pool/PoolObj.js +79 -79
- package/type/index.d.ts +30 -15
package/LightCore.js
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Crc32Util = exports.PromiseUtil = exports.BeizerUtil = exports.UniqueIDUtil = exports.StringUtil = exports.RandomNumUtil = exports.FloatDigitUtil = exports.DateUtil = exports.BitUtil = exports.MD5 = exports.BaseSingleton = exports.PoolObj = void 0;
|
|
7
|
+
var PoolObj_1 = require("./pool/PoolObj");
|
|
8
|
+
Object.defineProperty(exports, "PoolObj", { enumerable: true, get: function () { return PoolObj_1.PoolObj; } });
|
|
9
|
+
var BaseSingleton_1 = require("./common/base/BaseSingleton");
|
|
10
|
+
Object.defineProperty(exports, "BaseSingleton", { enumerable: true, get: function () { return BaseSingleton_1.BaseSingleton; } });
|
|
11
|
+
var BitUtil_1 = require("./common/util/BitUtil");
|
|
12
|
+
Object.defineProperty(exports, "BitUtil", { enumerable: true, get: function () { return BitUtil_1.BitUtil; } });
|
|
13
|
+
var DateUtil_1 = require("./common/util/DateUtil");
|
|
14
|
+
Object.defineProperty(exports, "DateUtil", { enumerable: true, get: function () { return DateUtil_1.DateUtil; } });
|
|
15
|
+
var FloatDigitUtil_1 = require("./common/util/FloatDigitUtil");
|
|
16
|
+
Object.defineProperty(exports, "FloatDigitUtil", { enumerable: true, get: function () { return FloatDigitUtil_1.FloatDigitUtil; } });
|
|
17
|
+
var RandomNumUtil_1 = require("./common/util/RandomNumUtil");
|
|
18
|
+
Object.defineProperty(exports, "RandomNumUtil", { enumerable: true, get: function () { return RandomNumUtil_1.RandomNumUtil; } });
|
|
19
|
+
var StringUtil_1 = require("./common/util/StringUtil");
|
|
20
|
+
Object.defineProperty(exports, "StringUtil", { enumerable: true, get: function () { return StringUtil_1.StringUtil; } });
|
|
21
|
+
var UniqueIDUtil_1 = require("./common/util/UniqueIDUtil");
|
|
22
|
+
Object.defineProperty(exports, "UniqueIDUtil", { enumerable: true, get: function () { return UniqueIDUtil_1.UniqueIDUtil; } });
|
|
23
|
+
var BeizerUtil_1 = require("./common/util/BeizerUtil");
|
|
24
|
+
Object.defineProperty(exports, "BeizerUtil", { enumerable: true, get: function () { return BeizerUtil_1.BeizerUtil; } });
|
|
25
|
+
var MD5_1 = require("./common/md5/MD5");
|
|
26
|
+
Object.defineProperty(exports, "MD5", { enumerable: true, get: function () { return MD5_1.MD5; } });
|
|
27
|
+
var PromiseUtil_1 = __importDefault(require("./common/util/PromiseUtil"));
|
|
28
|
+
exports.PromiseUtil = PromiseUtil_1.default;
|
|
29
|
+
var Crc32Util_1 = __importDefault(require("./common/util/Crc32Util"));
|
|
30
|
+
exports.Crc32Util = Crc32Util_1.default;
|
|
31
|
+
module.exports = {
|
|
32
|
+
PoolObj: PoolObj_1.PoolObj,
|
|
33
|
+
BaseSingleton: BaseSingleton_1.BaseSingleton,
|
|
34
|
+
MD5: MD5_1.MD5,
|
|
35
|
+
BitUtil: BitUtil_1.BitUtil,
|
|
36
|
+
DateUtil: DateUtil_1.DateUtil,
|
|
37
|
+
FloatDigitUtil: FloatDigitUtil_1.FloatDigitUtil,
|
|
38
|
+
RandomNumUtil: RandomNumUtil_1.RandomNumUtil,
|
|
39
|
+
StringUtil: StringUtil_1.StringUtil,
|
|
40
|
+
UniqueIDUtil: UniqueIDUtil_1.UniqueIDUtil,
|
|
41
|
+
BeizerUtil: BeizerUtil_1.BeizerUtil,
|
|
42
|
+
PromiseUtil: PromiseUtil_1.default,
|
|
43
|
+
Crc32Util: Crc32Util_1.default
|
|
44
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseSingleton = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* 泛型单例基类
|
|
6
|
-
* @author Aonaufly
|
|
7
|
-
*/
|
|
8
|
-
var BaseSingleton = /** @class */ (function () {
|
|
9
|
-
function BaseSingleton() {
|
|
10
|
-
}
|
|
11
|
-
BaseSingleton.getInstance = function (c) {
|
|
12
|
-
if (this._instance == null) {
|
|
13
|
-
this._instance = new c();
|
|
14
|
-
}
|
|
15
|
-
return this._instance;
|
|
16
|
-
};
|
|
17
|
-
BaseSingleton.prototype.destroy = function () {
|
|
18
|
-
BaseSingleton._instance = null;
|
|
19
|
-
};
|
|
20
|
-
BaseSingleton._instance = null;
|
|
21
|
-
return BaseSingleton;
|
|
22
|
-
}());
|
|
23
|
-
exports.BaseSingleton = BaseSingleton;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSingleton = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 泛型单例基类
|
|
6
|
+
* @author Aonaufly
|
|
7
|
+
*/
|
|
8
|
+
var BaseSingleton = /** @class */ (function () {
|
|
9
|
+
function BaseSingleton() {
|
|
10
|
+
}
|
|
11
|
+
BaseSingleton.getInstance = function (c) {
|
|
12
|
+
if (this._instance == null) {
|
|
13
|
+
this._instance = new c();
|
|
14
|
+
}
|
|
15
|
+
return this._instance;
|
|
16
|
+
};
|
|
17
|
+
BaseSingleton.prototype.destroy = function () {
|
|
18
|
+
BaseSingleton._instance = null;
|
|
19
|
+
};
|
|
20
|
+
BaseSingleton._instance = null;
|
|
21
|
+
return BaseSingleton;
|
|
22
|
+
}());
|
|
23
|
+
exports.BaseSingleton = BaseSingleton;
|
package/common/base/IClear.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/common/base/IDestroy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|