dgeoutils 2.1.0 → 2.2.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/dist/DCircle.d.ts +25 -1
- package/dist/DCircle.js +29 -5
- package/dist/DLine.d.ts +10 -2
- package/dist/DLine.js +32 -8
- package/dist/DPoint.d.ts +126 -12
- package/dist/DPoint.js +46 -22
- package/dist/DPolygon.d.ts +26 -32
- package/dist/DPolygon.js +114 -144
- package/dist/DPolygonLoop.d.ts +87 -8
- package/dist/DPolygonLoop.js +265 -62
- package/dist/TraceMatrix.js +7 -9
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +4 -2
- package/package.json +1 -1
package/dist/DPolygonLoop.js
CHANGED
|
@@ -1,155 +1,358 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DPolygonLoop = void 0;
|
|
4
|
+
var LoopFunctions;
|
|
5
|
+
(function (LoopFunctions) {
|
|
6
|
+
LoopFunctions[LoopFunctions["getTileFromCoords"] = 0] = "getTileFromCoords";
|
|
7
|
+
LoopFunctions[LoopFunctions["getCoordsFromTile"] = 1] = "getCoordsFromTile";
|
|
8
|
+
LoopFunctions[LoopFunctions["height"] = 2] = "height";
|
|
9
|
+
LoopFunctions[LoopFunctions["setX"] = 3] = "setX";
|
|
10
|
+
LoopFunctions[LoopFunctions["setY"] = 4] = "setY";
|
|
11
|
+
LoopFunctions[LoopFunctions["rotate"] = 5] = "rotate";
|
|
12
|
+
LoopFunctions[LoopFunctions["move"] = 6] = "move";
|
|
13
|
+
LoopFunctions[LoopFunctions["round"] = 7] = "round";
|
|
14
|
+
LoopFunctions[LoopFunctions["ceil"] = 8] = "ceil";
|
|
15
|
+
LoopFunctions[LoopFunctions["floor"] = 9] = "floor";
|
|
16
|
+
LoopFunctions[LoopFunctions["toFixed"] = 10] = "toFixed";
|
|
17
|
+
LoopFunctions[LoopFunctions["abs"] = 11] = "abs";
|
|
18
|
+
LoopFunctions[LoopFunctions["scale"] = 12] = "scale";
|
|
19
|
+
LoopFunctions[LoopFunctions["divide"] = 13] = "divide";
|
|
20
|
+
LoopFunctions[LoopFunctions["degreeToRadians"] = 14] = "degreeToRadians";
|
|
21
|
+
LoopFunctions[LoopFunctions["radiansToDegrees"] = 15] = "radiansToDegrees";
|
|
22
|
+
LoopFunctions[LoopFunctions["radiansToMeters"] = 16] = "radiansToMeters";
|
|
23
|
+
LoopFunctions[LoopFunctions["metersToRadians"] = 17] = "metersToRadians";
|
|
24
|
+
LoopFunctions[LoopFunctions["hipPoint"] = 18] = "hipPoint";
|
|
25
|
+
LoopFunctions[LoopFunctions["xPoint"] = 19] = "xPoint";
|
|
26
|
+
LoopFunctions[LoopFunctions["yPoint"] = 20] = "yPoint";
|
|
27
|
+
LoopFunctions[LoopFunctions["wPoint"] = 21] = "wPoint";
|
|
28
|
+
LoopFunctions[LoopFunctions["hPoint"] = 22] = "hPoint";
|
|
29
|
+
LoopFunctions[LoopFunctions["setIfLessThan"] = 23] = "setIfLessThan";
|
|
30
|
+
LoopFunctions[LoopFunctions["minus"] = 24] = "minus";
|
|
31
|
+
LoopFunctions[LoopFunctions["degreeToMeters"] = 25] = "degreeToMeters";
|
|
32
|
+
LoopFunctions[LoopFunctions["metersToDegree"] = 26] = "metersToDegree";
|
|
33
|
+
LoopFunctions[LoopFunctions["flipVertically"] = 27] = "flipVertically";
|
|
34
|
+
})(LoopFunctions || (LoopFunctions = {}));
|
|
35
|
+
// eslint-disable-next-line complexity
|
|
36
|
+
const decodePoolRecord = (a, { functionName, pointArg, numberPointArg, numberArg, setterArg }) => {
|
|
37
|
+
let res = a;
|
|
38
|
+
switch (functionName) {
|
|
39
|
+
case LoopFunctions.getTileFromCoords:
|
|
40
|
+
res = (k) => a(k)
|
|
41
|
+
.getTileFromCoords(numberArg);
|
|
42
|
+
break;
|
|
43
|
+
case LoopFunctions.getCoordsFromTile:
|
|
44
|
+
res = (k) => a(k)
|
|
45
|
+
.getCoordsFromTile(numberArg);
|
|
46
|
+
break;
|
|
47
|
+
case LoopFunctions.height:
|
|
48
|
+
res = (k) => a(k)
|
|
49
|
+
.height(numberArg);
|
|
50
|
+
break;
|
|
51
|
+
case LoopFunctions.setX:
|
|
52
|
+
res = (k) => a(k)
|
|
53
|
+
.setX(setterArg);
|
|
54
|
+
break;
|
|
55
|
+
case LoopFunctions.setY:
|
|
56
|
+
res = (k) => a(k)
|
|
57
|
+
.setY(setterArg);
|
|
58
|
+
break;
|
|
59
|
+
case LoopFunctions.rotate:
|
|
60
|
+
res = (k) => a(k)
|
|
61
|
+
.rotate(numberArg);
|
|
62
|
+
break;
|
|
63
|
+
case LoopFunctions.move:
|
|
64
|
+
res = (k) => a(k)
|
|
65
|
+
.move(numberPointArg, numberArg);
|
|
66
|
+
break;
|
|
67
|
+
case LoopFunctions.round:
|
|
68
|
+
res = (k) => a(k)
|
|
69
|
+
.round();
|
|
70
|
+
break;
|
|
71
|
+
case LoopFunctions.ceil:
|
|
72
|
+
res = (k) => a(k)
|
|
73
|
+
.ceil();
|
|
74
|
+
break;
|
|
75
|
+
case LoopFunctions.floor:
|
|
76
|
+
res = (k) => a(k)
|
|
77
|
+
.floor();
|
|
78
|
+
break;
|
|
79
|
+
case LoopFunctions.toFixed:
|
|
80
|
+
res = (k) => a(k)
|
|
81
|
+
.toFixed(numberArg);
|
|
82
|
+
break;
|
|
83
|
+
case LoopFunctions.abs:
|
|
84
|
+
res = (k) => a(k)
|
|
85
|
+
.abs();
|
|
86
|
+
break;
|
|
87
|
+
case LoopFunctions.scale:
|
|
88
|
+
res = (k) => a(k)
|
|
89
|
+
.scale(numberPointArg, numberArg);
|
|
90
|
+
break;
|
|
91
|
+
case LoopFunctions.divide:
|
|
92
|
+
res = (k) => a(k)
|
|
93
|
+
.divide(numberPointArg, numberArg);
|
|
94
|
+
break;
|
|
95
|
+
case LoopFunctions.degreeToRadians:
|
|
96
|
+
res = (k) => a(k)
|
|
97
|
+
.degreeToRadians();
|
|
98
|
+
break;
|
|
99
|
+
case LoopFunctions.radiansToDegrees:
|
|
100
|
+
res = (k) => a(k)
|
|
101
|
+
.radiansToDegrees();
|
|
102
|
+
break;
|
|
103
|
+
case LoopFunctions.radiansToMeters:
|
|
104
|
+
res = (k) => a(k)
|
|
105
|
+
.radiansToMeters();
|
|
106
|
+
break;
|
|
107
|
+
case LoopFunctions.metersToRadians:
|
|
108
|
+
res = (k) => a(k)
|
|
109
|
+
.metersToRadians();
|
|
110
|
+
break;
|
|
111
|
+
case LoopFunctions.hipPoint:
|
|
112
|
+
res = (k) => a(k)
|
|
113
|
+
.hipPoint;
|
|
114
|
+
break;
|
|
115
|
+
case LoopFunctions.xPoint:
|
|
116
|
+
res = (k) => a(k)
|
|
117
|
+
.xPoint;
|
|
118
|
+
break;
|
|
119
|
+
case LoopFunctions.yPoint:
|
|
120
|
+
res = (k) => a(k)
|
|
121
|
+
.yPoint;
|
|
122
|
+
break;
|
|
123
|
+
case LoopFunctions.wPoint:
|
|
124
|
+
res = (k) => a(k)
|
|
125
|
+
.wPoint;
|
|
126
|
+
break;
|
|
127
|
+
case LoopFunctions.hPoint:
|
|
128
|
+
res = (k) => a(k)
|
|
129
|
+
.hPoint;
|
|
130
|
+
break;
|
|
131
|
+
case LoopFunctions.setIfLessThan:
|
|
132
|
+
res = (k) => a(k)
|
|
133
|
+
.setIfLessThan(pointArg);
|
|
134
|
+
break;
|
|
135
|
+
case LoopFunctions.minus:
|
|
136
|
+
res = (k) => a(k)
|
|
137
|
+
.minus();
|
|
138
|
+
break;
|
|
139
|
+
case LoopFunctions.degreeToMeters:
|
|
140
|
+
res = (k) => a(k)
|
|
141
|
+
.degreeToMeters();
|
|
142
|
+
break;
|
|
143
|
+
case LoopFunctions.metersToDegree:
|
|
144
|
+
res = (k) => a(k)
|
|
145
|
+
.metersToDegree();
|
|
146
|
+
break;
|
|
147
|
+
case LoopFunctions.flipVertically:
|
|
148
|
+
res = (k) => a(k)
|
|
149
|
+
.flipVertically(numberPointArg);
|
|
150
|
+
break;
|
|
151
|
+
default:
|
|
152
|
+
}
|
|
153
|
+
return res;
|
|
154
|
+
};
|
|
4
155
|
class DPolygonLoop {
|
|
5
156
|
constructor(parent) {
|
|
6
|
-
this.f = (k) => k;
|
|
7
157
|
this.parent = parent;
|
|
158
|
+
this.pool = [];
|
|
159
|
+
}
|
|
160
|
+
getLoopFunction() {
|
|
161
|
+
return this.pool.reduce(decodePoolRecord, (k) => k);
|
|
8
162
|
}
|
|
9
163
|
/**
|
|
10
164
|
* Run loop
|
|
11
165
|
*/
|
|
12
|
-
run(
|
|
13
|
-
return this.parent.map(
|
|
166
|
+
run() {
|
|
167
|
+
return this.parent.map(this.getLoopFunction());
|
|
14
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* @param zoom default value would be `z` of point
|
|
171
|
+
*/
|
|
15
172
|
getTileFromCoords(zoom) {
|
|
16
|
-
|
|
17
|
-
|
|
173
|
+
this.pool.push({
|
|
174
|
+
functionName: LoopFunctions.getTileFromCoords,
|
|
175
|
+
numberArg: zoom
|
|
176
|
+
});
|
|
18
177
|
return this;
|
|
19
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* @param zoom default value would be `z` of point
|
|
181
|
+
*/
|
|
20
182
|
getCoordsFromTile(zoom) {
|
|
21
|
-
|
|
22
|
-
|
|
183
|
+
this.pool.push({
|
|
184
|
+
functionName: LoopFunctions.getCoordsFromTile,
|
|
185
|
+
numberArg: zoom
|
|
186
|
+
});
|
|
23
187
|
return this;
|
|
24
188
|
}
|
|
25
189
|
height(z) {
|
|
26
|
-
|
|
27
|
-
|
|
190
|
+
this.pool.push({
|
|
191
|
+
functionName: LoopFunctions.height,
|
|
192
|
+
numberArg: z
|
|
193
|
+
});
|
|
28
194
|
return this;
|
|
29
195
|
}
|
|
30
196
|
setX(x) {
|
|
31
|
-
|
|
32
|
-
|
|
197
|
+
this.pool.push({
|
|
198
|
+
functionName: LoopFunctions.setX,
|
|
199
|
+
setterArg: x
|
|
200
|
+
});
|
|
33
201
|
return this;
|
|
34
202
|
}
|
|
35
203
|
setY(y) {
|
|
36
|
-
|
|
37
|
-
|
|
204
|
+
this.pool.push({
|
|
205
|
+
functionName: LoopFunctions.setY,
|
|
206
|
+
setterArg: y
|
|
207
|
+
});
|
|
38
208
|
return this;
|
|
39
209
|
}
|
|
40
210
|
rotate(a) {
|
|
41
|
-
|
|
42
|
-
|
|
211
|
+
this.pool.push({
|
|
212
|
+
functionName: LoopFunctions.rotate,
|
|
213
|
+
numberArg: a
|
|
214
|
+
});
|
|
43
215
|
return this;
|
|
44
216
|
}
|
|
45
|
-
move(x =
|
|
46
|
-
|
|
47
|
-
|
|
217
|
+
move(x, y = x) {
|
|
218
|
+
this.pool.push({
|
|
219
|
+
functionName: LoopFunctions.move,
|
|
220
|
+
numberPointArg: x,
|
|
221
|
+
numberArg: y
|
|
222
|
+
});
|
|
48
223
|
return this;
|
|
49
224
|
}
|
|
50
225
|
round() {
|
|
51
|
-
|
|
52
|
-
|
|
226
|
+
this.pool.push({
|
|
227
|
+
functionName: LoopFunctions.round
|
|
228
|
+
});
|
|
53
229
|
return this;
|
|
54
230
|
}
|
|
55
231
|
ceil() {
|
|
56
|
-
|
|
57
|
-
|
|
232
|
+
this.pool.push({
|
|
233
|
+
functionName: LoopFunctions.ceil
|
|
234
|
+
});
|
|
58
235
|
return this;
|
|
59
236
|
}
|
|
60
237
|
floor() {
|
|
61
|
-
|
|
62
|
-
|
|
238
|
+
this.pool.push({
|
|
239
|
+
functionName: LoopFunctions.floor
|
|
240
|
+
});
|
|
63
241
|
return this;
|
|
64
242
|
}
|
|
65
243
|
toFixed(n = 2) {
|
|
66
|
-
|
|
67
|
-
|
|
244
|
+
this.pool.push({
|
|
245
|
+
functionName: LoopFunctions.toFixed,
|
|
246
|
+
numberArg: n
|
|
247
|
+
});
|
|
68
248
|
return this;
|
|
69
249
|
}
|
|
70
250
|
abs() {
|
|
71
|
-
|
|
72
|
-
|
|
251
|
+
this.pool.push({
|
|
252
|
+
functionName: LoopFunctions.abs
|
|
253
|
+
});
|
|
73
254
|
return this;
|
|
74
255
|
}
|
|
75
|
-
scale(x =
|
|
76
|
-
|
|
77
|
-
|
|
256
|
+
scale(x, y = x) {
|
|
257
|
+
this.pool.push({
|
|
258
|
+
functionName: LoopFunctions.scale,
|
|
259
|
+
numberPointArg: x,
|
|
260
|
+
numberArg: y
|
|
261
|
+
});
|
|
78
262
|
return this;
|
|
79
263
|
}
|
|
80
|
-
divide(x
|
|
81
|
-
|
|
82
|
-
|
|
264
|
+
divide(x, y) {
|
|
265
|
+
this.pool.push({
|
|
266
|
+
functionName: LoopFunctions.divide,
|
|
267
|
+
numberPointArg: x,
|
|
268
|
+
numberArg: y
|
|
269
|
+
});
|
|
83
270
|
return this;
|
|
84
271
|
}
|
|
85
272
|
degreeToRadians() {
|
|
86
|
-
|
|
87
|
-
|
|
273
|
+
this.pool.push({
|
|
274
|
+
functionName: LoopFunctions.degreeToRadians
|
|
275
|
+
});
|
|
88
276
|
return this;
|
|
89
277
|
}
|
|
90
278
|
radiansToDegrees() {
|
|
91
|
-
|
|
92
|
-
|
|
279
|
+
this.pool.push({
|
|
280
|
+
functionName: LoopFunctions.radiansToDegrees
|
|
281
|
+
});
|
|
93
282
|
return this;
|
|
94
283
|
}
|
|
95
284
|
radiansToMeters() {
|
|
96
|
-
|
|
97
|
-
|
|
285
|
+
this.pool.push({
|
|
286
|
+
functionName: LoopFunctions.radiansToMeters
|
|
287
|
+
});
|
|
98
288
|
return this;
|
|
99
289
|
}
|
|
100
290
|
metersToRadians() {
|
|
101
|
-
|
|
102
|
-
|
|
291
|
+
this.pool.push({
|
|
292
|
+
functionName: LoopFunctions.metersToRadians
|
|
293
|
+
});
|
|
103
294
|
return this;
|
|
104
295
|
}
|
|
105
296
|
getHipPoint() {
|
|
106
|
-
|
|
107
|
-
|
|
297
|
+
this.pool.push({
|
|
298
|
+
functionName: LoopFunctions.hipPoint
|
|
299
|
+
});
|
|
108
300
|
return this;
|
|
109
301
|
}
|
|
110
302
|
getXPoint() {
|
|
111
|
-
|
|
112
|
-
|
|
303
|
+
this.pool.push({
|
|
304
|
+
functionName: LoopFunctions.xPoint
|
|
305
|
+
});
|
|
113
306
|
return this;
|
|
114
307
|
}
|
|
115
308
|
getYPoint() {
|
|
116
|
-
|
|
117
|
-
|
|
309
|
+
this.pool.push({
|
|
310
|
+
functionName: LoopFunctions.yPoint
|
|
311
|
+
});
|
|
118
312
|
return this;
|
|
119
313
|
}
|
|
120
314
|
getWPoint() {
|
|
121
|
-
|
|
122
|
-
|
|
315
|
+
this.pool.push({
|
|
316
|
+
functionName: LoopFunctions.wPoint
|
|
317
|
+
});
|
|
123
318
|
return this;
|
|
124
319
|
}
|
|
125
320
|
getHPoint() {
|
|
126
|
-
|
|
127
|
-
|
|
321
|
+
this.pool.push({
|
|
322
|
+
functionName: LoopFunctions.hPoint
|
|
323
|
+
});
|
|
128
324
|
return this;
|
|
129
325
|
}
|
|
130
326
|
setIfLessThan(p) {
|
|
131
|
-
|
|
132
|
-
|
|
327
|
+
this.pool.push({
|
|
328
|
+
functionName: LoopFunctions.setIfLessThan,
|
|
329
|
+
pointArg: p
|
|
330
|
+
});
|
|
133
331
|
return this;
|
|
134
332
|
}
|
|
135
333
|
minus() {
|
|
136
|
-
|
|
137
|
-
|
|
334
|
+
this.pool.push({
|
|
335
|
+
functionName: LoopFunctions.minus
|
|
336
|
+
});
|
|
138
337
|
return this;
|
|
139
338
|
}
|
|
140
339
|
degreeToMeters() {
|
|
141
|
-
|
|
142
|
-
|
|
340
|
+
this.pool.push({
|
|
341
|
+
functionName: LoopFunctions.degreeToMeters
|
|
342
|
+
});
|
|
143
343
|
return this;
|
|
144
344
|
}
|
|
145
345
|
metersToDegree() {
|
|
146
|
-
|
|
147
|
-
|
|
346
|
+
this.pool.push({
|
|
347
|
+
functionName: LoopFunctions.metersToDegree
|
|
348
|
+
});
|
|
148
349
|
return this;
|
|
149
350
|
}
|
|
150
351
|
flipVertically(size) {
|
|
151
|
-
|
|
152
|
-
|
|
352
|
+
this.pool.push({
|
|
353
|
+
functionName: LoopFunctions.flipVertically,
|
|
354
|
+
numberPointArg: size
|
|
355
|
+
});
|
|
153
356
|
return this;
|
|
154
357
|
}
|
|
155
358
|
}
|
package/dist/TraceMatrix.js
CHANGED
|
@@ -4,10 +4,7 @@ exports.TraceMatrix = exports.TraceMatrixValues = void 0;
|
|
|
4
4
|
const DPoint_1 = require("./DPoint");
|
|
5
5
|
const DPolygon_1 = require("./DPolygon");
|
|
6
6
|
const FastSearch_1 = require("./FastSearch");
|
|
7
|
-
const
|
|
8
|
-
.join(' ')
|
|
9
|
-
.split('')
|
|
10
|
-
.map((r, i) => i);
|
|
7
|
+
const utils_1 = require("./utils");
|
|
11
8
|
var TraceMatrixValues;
|
|
12
9
|
(function (TraceMatrixValues) {
|
|
13
10
|
TraceMatrixValues[TraceMatrixValues["f"] = 0] = "f";
|
|
@@ -36,7 +33,7 @@ class TraceMatrix {
|
|
|
36
33
|
const marked = TraceMatrix.createMatrix(this.size, () => TraceMatrixValues.f);
|
|
37
34
|
setByPosition(marked, s, TraceMatrixValues.t);
|
|
38
35
|
while (startIndex < res.length) {
|
|
39
|
-
const r = res.
|
|
36
|
+
const r = res.at(startIndex);
|
|
40
37
|
for (let i = -1; i < 2; i++) {
|
|
41
38
|
for (let j = -1; j < 2; j++) {
|
|
42
39
|
const t = new DPoint_1.DPoint(r.x + i, r.y + j);
|
|
@@ -90,14 +87,14 @@ class TraceMatrix {
|
|
|
90
87
|
const left = (d) => (d + traceDirections.length + 1) % traceDirections.length;
|
|
91
88
|
const right = (d) => (d + traceDirections.length - 1) % traceDirections.length;
|
|
92
89
|
if (group.length < 2) {
|
|
93
|
-
const t = group.
|
|
90
|
+
const t = group.at(0).clone();
|
|
94
91
|
return new DPolygon_1.DPolygon([t, t, t]);
|
|
95
92
|
}
|
|
96
93
|
const points = new DPolygon_1.DPolygon();
|
|
97
94
|
let direction = 0;
|
|
98
95
|
let prevDirection = Infinity;
|
|
99
|
-
let p = group.
|
|
100
|
-
while (!p.equal(group.
|
|
96
|
+
let p = group.at(0);
|
|
97
|
+
while (!p.equal(group.at(0)) || points.length < 2) {
|
|
101
98
|
// eslint-disable-next-line no-constant-condition
|
|
102
99
|
while (true) {
|
|
103
100
|
const nextValue = getByPosition(m, p.clone().move(traceDirections[direction]));
|
|
@@ -201,7 +198,8 @@ class TraceMatrix {
|
|
|
201
198
|
return res;
|
|
202
199
|
}
|
|
203
200
|
static createMatrix(size, f = () => TraceMatrixValues.f) {
|
|
204
|
-
return
|
|
201
|
+
return (0, utils_1.createArray)(size.h)
|
|
202
|
+
.map((v, i) => (0, utils_1.createArray)(size.w).map((v2, j) => f(new DPoint_1.DPoint(j, i))));
|
|
205
203
|
}
|
|
206
204
|
}
|
|
207
205
|
exports.TraceMatrix = TraceMatrix;
|
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkFunction = exports.warn = void 0;
|
|
3
|
+
exports.createArray = exports.checkFunction = exports.warn = void 0;
|
|
4
4
|
const index_1 = require("./index");
|
|
5
5
|
const DPoint_1 = require("./DPoint");
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -21,7 +21,7 @@ const shouldBeInt = (scope, funcName, argName) => (p) => {
|
|
|
21
21
|
};
|
|
22
22
|
const shouldBeUInt = (scope, funcName, argName) => (p) => {
|
|
23
23
|
if (!p.clone().round()
|
|
24
|
-
.equal(p) || !p.gtOrEqual(DPoint_1.DPoint.
|
|
24
|
+
.equal(p) || !p.gtOrEqual(DPoint_1.DPoint.zero())) {
|
|
25
25
|
(0, exports.warn)(`"${funcName}" -> "${argName}" should be UInt!`);
|
|
26
26
|
}
|
|
27
27
|
return scope;
|
|
@@ -66,3 +66,5 @@ const checkFunction = (funcName) => ({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
exports.checkFunction = checkFunction;
|
|
69
|
+
const createArray = (v) => new Array(v).fill(0);
|
|
70
|
+
exports.createArray = createArray;
|