mol_wire_lib 1.0.1280 → 1.0.1282
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/node.deps.json +1 -1
- package/node.js +8 -18
- package/node.js.map +1 -1
- package/node.mjs +8 -18
- package/node.test.js +8 -18
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +8 -18
- package/web.js.map +1 -1
- package/web.mjs +8 -18
package/node.mjs
CHANGED
|
@@ -84,9 +84,8 @@ var $;
|
|
|
84
84
|
if (sub_pos !== end) {
|
|
85
85
|
this.peer_move(end, sub_pos);
|
|
86
86
|
}
|
|
87
|
-
this.data.
|
|
88
|
-
this.
|
|
89
|
-
if (this.data.length === this.sub_from)
|
|
87
|
+
this.data.length = end;
|
|
88
|
+
if (end === this.sub_from)
|
|
90
89
|
this.reap();
|
|
91
90
|
}
|
|
92
91
|
reap() { }
|
|
@@ -318,9 +317,8 @@ var $;
|
|
|
318
317
|
const sub = this.data[cursor];
|
|
319
318
|
const pos = this.data[cursor + 1];
|
|
320
319
|
sub.pub_off(pos);
|
|
321
|
-
this.data.pop();
|
|
322
|
-
this.data.pop();
|
|
323
320
|
}
|
|
321
|
+
this.sub_from = this.pub_from;
|
|
324
322
|
this.cursor = this.pub_from;
|
|
325
323
|
this.track_cut();
|
|
326
324
|
this.cursor = $mol_wire_cursor.final;
|
|
@@ -329,23 +327,15 @@ var $;
|
|
|
329
327
|
if (this.cursor < this.pub_from) {
|
|
330
328
|
$mol_fail(new Error('Cut of non begun sub'));
|
|
331
329
|
}
|
|
332
|
-
let
|
|
330
|
+
let end = this.data.length;
|
|
333
331
|
for (let cursor = this.cursor; cursor < this.sub_from; cursor += 2) {
|
|
334
332
|
const pub = this.data[cursor];
|
|
335
333
|
pub?.sub_off(this.data[cursor + 1]);
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
this.
|
|
339
|
-
this.data.pop();
|
|
340
|
-
}
|
|
341
|
-
else {
|
|
342
|
-
++tail;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
for (; tail; --tail) {
|
|
346
|
-
this.data.pop();
|
|
347
|
-
this.data.pop();
|
|
334
|
+
end -= 2;
|
|
335
|
+
if (this.sub_from <= end)
|
|
336
|
+
this.peer_move(end, cursor);
|
|
348
337
|
}
|
|
338
|
+
this.data.length = end;
|
|
349
339
|
this.sub_from = this.cursor;
|
|
350
340
|
}
|
|
351
341
|
complete() { }
|
package/node.test.js
CHANGED
|
@@ -75,9 +75,8 @@ var $;
|
|
|
75
75
|
if (sub_pos !== end) {
|
|
76
76
|
this.peer_move(end, sub_pos);
|
|
77
77
|
}
|
|
78
|
-
this.data.
|
|
79
|
-
this.
|
|
80
|
-
if (this.data.length === this.sub_from)
|
|
78
|
+
this.data.length = end;
|
|
79
|
+
if (end === this.sub_from)
|
|
81
80
|
this.reap();
|
|
82
81
|
}
|
|
83
82
|
reap() { }
|
|
@@ -309,9 +308,8 @@ var $;
|
|
|
309
308
|
const sub = this.data[cursor];
|
|
310
309
|
const pos = this.data[cursor + 1];
|
|
311
310
|
sub.pub_off(pos);
|
|
312
|
-
this.data.pop();
|
|
313
|
-
this.data.pop();
|
|
314
311
|
}
|
|
312
|
+
this.sub_from = this.pub_from;
|
|
315
313
|
this.cursor = this.pub_from;
|
|
316
314
|
this.track_cut();
|
|
317
315
|
this.cursor = $mol_wire_cursor.final;
|
|
@@ -320,23 +318,15 @@ var $;
|
|
|
320
318
|
if (this.cursor < this.pub_from) {
|
|
321
319
|
$mol_fail(new Error('Cut of non begun sub'));
|
|
322
320
|
}
|
|
323
|
-
let
|
|
321
|
+
let end = this.data.length;
|
|
324
322
|
for (let cursor = this.cursor; cursor < this.sub_from; cursor += 2) {
|
|
325
323
|
const pub = this.data[cursor];
|
|
326
324
|
pub?.sub_off(this.data[cursor + 1]);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
this.
|
|
330
|
-
this.data.pop();
|
|
331
|
-
}
|
|
332
|
-
else {
|
|
333
|
-
++tail;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
for (; tail; --tail) {
|
|
337
|
-
this.data.pop();
|
|
338
|
-
this.data.pop();
|
|
325
|
+
end -= 2;
|
|
326
|
+
if (this.sub_from <= end)
|
|
327
|
+
this.peer_move(end, cursor);
|
|
339
328
|
}
|
|
329
|
+
this.data.length = end;
|
|
340
330
|
this.sub_from = this.cursor;
|
|
341
331
|
}
|
|
342
332
|
complete() { }
|