light-h5-core-lib 2.5.4 → 2.5.5
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 +17 -17
- package/package.json +1 -1
- package/type/index.d.ts +8 -19
package/LightCore.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UniqueIDUtil = exports.StringUtil = exports.RandomNumUtil = exports.FloatDigitUtil = exports.DateUtil = exports.BitUtil = exports.BaseSingleton = exports.PoolObj = void 0;
|
|
4
4
|
var PoolObj_1 = require("./pool/PoolObj");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
5
|
+
Object.defineProperty(exports, "PoolObj", { enumerable: true, get: function () { return PoolObj_1.PoolObj; } });
|
|
6
6
|
var BaseSingleton_1 = require("./common/base/BaseSingleton");
|
|
7
|
-
Object.defineProperty(exports, "
|
|
7
|
+
Object.defineProperty(exports, "BaseSingleton", { enumerable: true, get: function () { return BaseSingleton_1.BaseSingleton; } });
|
|
8
8
|
var BitUtil_1 = require("./common/util/BitUtil");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "BitUtil", { enumerable: true, get: function () { return BitUtil_1.BitUtil; } });
|
|
10
10
|
var DateUtil_1 = require("./common/util/DateUtil");
|
|
11
|
-
Object.defineProperty(exports, "
|
|
11
|
+
Object.defineProperty(exports, "DateUtil", { enumerable: true, get: function () { return DateUtil_1.DateUtil; } });
|
|
12
12
|
var FloatDigitUtil_1 = require("./common/util/FloatDigitUtil");
|
|
13
|
-
Object.defineProperty(exports, "
|
|
13
|
+
Object.defineProperty(exports, "FloatDigitUtil", { enumerable: true, get: function () { return FloatDigitUtil_1.FloatDigitUtil; } });
|
|
14
14
|
var RandomNumUtil_1 = require("./common/util/RandomNumUtil");
|
|
15
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "RandomNumUtil", { enumerable: true, get: function () { return RandomNumUtil_1.RandomNumUtil; } });
|
|
16
16
|
var StringUtil_1 = require("./common/util/StringUtil");
|
|
17
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "StringUtil", { enumerable: true, get: function () { return StringUtil_1.StringUtil; } });
|
|
18
18
|
var UniqueIDUtil_1 = require("./common/util/UniqueIDUtil");
|
|
19
|
-
Object.defineProperty(exports, "
|
|
20
|
-
module.exports.PoolObj =
|
|
21
|
-
module.exports.BaseSingleton =
|
|
22
|
-
module.exports.BitUtil =
|
|
23
|
-
module.exports.DateUtil =
|
|
24
|
-
module.exports.FloatDigitUtil =
|
|
25
|
-
module.exports.RandomNumUtil =
|
|
26
|
-
module.exports.StringUtil =
|
|
27
|
-
module.exports.UniqueIDUtil =
|
|
19
|
+
Object.defineProperty(exports, "UniqueIDUtil", { enumerable: true, get: function () { return UniqueIDUtil_1.UniqueIDUtil; } });
|
|
20
|
+
// module.exports.PoolObj = PoolObj;
|
|
21
|
+
// module.exports.BaseSingleton = BaseSingleton;
|
|
22
|
+
// module.exports.BitUtil = BitUtil;
|
|
23
|
+
// module.exports.DateUtil = DateUtil;
|
|
24
|
+
// module.exports.FloatDigitUtil = FloatDigitUtil;
|
|
25
|
+
// module.exports.RandomNumUtil = RandomNumUtil;
|
|
26
|
+
// module.exports.StringUtil = StringUtil;
|
|
27
|
+
// module.exports.UniqueIDUtil = UniqueIDUtil;
|
|
28
28
|
module.exports = {
|
|
29
29
|
PoolObj: PoolObj_1.PoolObj,
|
|
30
30
|
BaseSingleton: BaseSingleton_1.BaseSingleton,
|
package/package.json
CHANGED
package/type/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface IClear extends IDestroy {
|
|
|
10
10
|
* 对象池(泛型)
|
|
11
11
|
* @author aonaufly
|
|
12
12
|
*/
|
|
13
|
-
declare class PoolObj<T> implements IClear {
|
|
13
|
+
export declare class PoolObj<T> implements IClear {
|
|
14
14
|
private _pool;
|
|
15
15
|
private _cup;
|
|
16
16
|
/**
|
|
@@ -33,7 +33,7 @@ declare class PoolObj<T> implements IClear {
|
|
|
33
33
|
clear(): void;
|
|
34
34
|
destroy(isCleared?: boolean): void;
|
|
35
35
|
}
|
|
36
|
-
declare class BaseSingleton<T> {
|
|
36
|
+
export declare class BaseSingleton<T> {
|
|
37
37
|
private static _instance;
|
|
38
38
|
static getInstance<T>(c: {
|
|
39
39
|
new (): T;
|
|
@@ -43,7 +43,7 @@ declare class BaseSingleton<T> {
|
|
|
43
43
|
* 位操作工具(从右向左←)
|
|
44
44
|
* @author aonaufly
|
|
45
45
|
*/
|
|
46
|
-
declare class BitUtil {
|
|
46
|
+
export declare class BitUtil {
|
|
47
47
|
/**
|
|
48
48
|
* 读取uint类型某位的值, bit从1开始
|
|
49
49
|
*/
|
|
@@ -60,7 +60,7 @@ declare class BitUtil {
|
|
|
60
60
|
* 日期(时间)工具
|
|
61
61
|
* @author aonaufly
|
|
62
62
|
*/
|
|
63
|
-
declare class DateUtil {
|
|
63
|
+
export declare class DateUtil {
|
|
64
64
|
/**
|
|
65
65
|
* 获取指定时间的时间戳 (单位:ms)
|
|
66
66
|
* @param date 如: "2020-3-14 11:30:30"
|
|
@@ -106,7 +106,7 @@ declare class DateUtil {
|
|
|
106
106
|
* Float精度
|
|
107
107
|
* @author aonaufly
|
|
108
108
|
*/
|
|
109
|
-
declare class FloatDigitUtil {
|
|
109
|
+
export declare class FloatDigitUtil {
|
|
110
110
|
/**
|
|
111
111
|
* 确定小数的精度<b style="color:red">2个小数相加会有精度错误</b>
|
|
112
112
|
* @param fNum 小数
|
|
@@ -118,7 +118,7 @@ declare class FloatDigitUtil {
|
|
|
118
118
|
* 随机数生成工具
|
|
119
119
|
* @author aonaufly
|
|
120
120
|
*/
|
|
121
|
-
declare class RandomNumUtil {
|
|
121
|
+
export declare class RandomNumUtil {
|
|
122
122
|
/**
|
|
123
123
|
* 获取一定方位的随机整数
|
|
124
124
|
*
|
|
@@ -134,7 +134,7 @@ declare class RandomNumUtil {
|
|
|
134
134
|
* 字符串工具
|
|
135
135
|
* @author aonaufly
|
|
136
136
|
*/
|
|
137
|
-
declare class StringUtil {
|
|
137
|
+
export declare class StringUtil {
|
|
138
138
|
/**
|
|
139
139
|
* 字符串的格式化 , 使用 {index = 0}的模式
|
|
140
140
|
* @param str 源字符串
|
|
@@ -153,22 +153,11 @@ declare class StringUtil {
|
|
|
153
153
|
* 唯一ID生成器
|
|
154
154
|
* @author Aonaufly
|
|
155
155
|
*/
|
|
156
|
-
declare class UniqueIDUtil {
|
|
156
|
+
export declare class UniqueIDUtil {
|
|
157
157
|
/**生成唯一ID值*/
|
|
158
158
|
static getUniqueId(): string;
|
|
159
159
|
/**生成复合的Key值*/
|
|
160
160
|
static getCompositeKey(key: string | number, uniqueId: string): string;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export {
|
|
164
|
-
BaseSingleton as coreBaseSingleton,
|
|
165
|
-
BitUtil as coreBitUtil,
|
|
166
|
-
DateUtil as coreDateUtil,
|
|
167
|
-
FloatDigitUtil as coreFloatDigitUtil,
|
|
168
|
-
PoolObj as corePoolObj,
|
|
169
|
-
RandomNumUtil as coreRandomNumUtil,
|
|
170
|
-
StringUtil as coreStringUtil,
|
|
171
|
-
UniqueIDUtil as coreUniqueIDUtil,
|
|
172
|
-
};
|
|
173
|
-
|
|
174
163
|
export {};
|