mingyang_text 2022.8.26 → 2022.10.3
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/package.json +8 -13
- package/text.js +21 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mingyang_text",
|
3
|
-
"version": "2022.
|
3
|
+
"version": "2022.10.03",
|
4
4
|
"description": "MingYang Packet",
|
5
5
|
"main": "text.js",
|
6
6
|
"scripts": {
|
@@ -8,18 +8,13 @@
|
|
8
8
|
},
|
9
9
|
"keywords": [
|
10
10
|
"mingyang",
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"image",
|
18
|
-
"log",
|
19
|
-
"packet",
|
20
|
-
"path",
|
21
|
-
"text"
|
11
|
+
"mingyang/text",
|
12
|
+
"text/Bin_with",
|
13
|
+
"text/end_with",
|
14
|
+
"string/format",
|
15
|
+
"timeid",
|
16
|
+
"time/uuid"
|
22
17
|
],
|
23
|
-
"author": "wang.fu.jun@qq.com",
|
18
|
+
"author": "wang.fu.jun@qq.com,wang.ming.yang@126.com",
|
24
19
|
"license": "ISC"
|
25
20
|
}
|
package/text.js
CHANGED
@@ -109,7 +109,6 @@ function func_Filter(args_Text, args_Bin, args_End) {
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
|
112
|
-
//t_Line = args_Text.substr(t_iBin + args_Bin.length, t_iEnd - t_iBin - args_Bin.length);
|
113
112
|
t_Line = args_Text.substring(t_iBin + args_Bin.length, t_iEnd);
|
114
113
|
t_Result.push(t_Line);
|
115
114
|
|
@@ -136,15 +135,35 @@ function func_TimeID_32() {
|
|
136
135
|
}
|
137
136
|
module.exports.do_TimeID_32 = func_TimeID_32;
|
138
137
|
|
138
|
+
/**
|
139
|
+
* 返回一个36位的时间在左侧的UUID
|
140
|
+
*/
|
141
|
+
function func_TimeNo_36() {
|
142
|
+
return func_TimeID(36, "0123456789");
|
143
|
+
}
|
144
|
+
module.exports.do_TimeNo_36 = func_TimeNo_36;
|
145
|
+
|
146
|
+
/**
|
147
|
+
* 返回一个32位的时间在左侧的UUID
|
148
|
+
*/
|
149
|
+
function func_TimeNo_32() {
|
150
|
+
return func_TimeID(32, "0123456789");
|
151
|
+
}
|
152
|
+
module.exports.do_TimeNo_32 = func_TimeNo_32;
|
153
|
+
|
139
154
|
/**
|
140
155
|
* 返回一个时间在左侧的UUID
|
141
156
|
*/
|
142
|
-
function func_TimeID(args_Digit) {
|
157
|
+
function func_TimeID(args_Digit, args_PlaceHolder) {
|
143
158
|
let temp_List = new Array(args_Digit);
|
144
159
|
|
145
160
|
//let temp_PlaceHolder = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
|
146
161
|
let temp_PlaceHolder = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
147
162
|
|
163
|
+
if (args_PlaceHolder != null) {
|
164
|
+
temp_PlaceHolder = args_PlaceHolder;
|
165
|
+
}
|
166
|
+
|
148
167
|
let temp_Time = func_DateTimeToString(null, "yyyy-MMdd-HHmmss-fff");
|
149
168
|
for (let i = 0; i < temp_Time.length; i++) {
|
150
169
|
temp_List[i] = temp_Time[i];
|