mol_crypto2_lib 0.0.46 → 0.0.48
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 +9 -3
- package/node.js.map +1 -1
- package/node.mjs +9 -3
- package/node.test.js +9 -3
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +3 -3
- package/web.js.map +1 -1
- package/web.mjs +3 -3
- package/web.test.js +6 -0
- package/web.test.js.map +1 -1
package/node.mjs
CHANGED
|
@@ -542,10 +542,10 @@ var $;
|
|
|
542
542
|
static wrap(task) {
|
|
543
543
|
const store = new WeakMap();
|
|
544
544
|
const fun = function (next) {
|
|
545
|
-
if (next === undefined && store.has(this))
|
|
546
|
-
return store.get(this);
|
|
545
|
+
if (next === undefined && store.has(this ?? fun))
|
|
546
|
+
return store.get(this ?? fun);
|
|
547
547
|
const val = task.call(this, next) ?? next;
|
|
548
|
-
store.set(this, val);
|
|
548
|
+
store.set(this ?? fun, val);
|
|
549
549
|
return val;
|
|
550
550
|
};
|
|
551
551
|
Reflect.defineProperty(fun, 'name', { value: task.name + ' ' });
|
|
@@ -1125,6 +1125,12 @@ var $;
|
|
|
1125
1125
|
// [ Symbol.toPrimitive ]() {
|
|
1126
1126
|
// return this.toString()
|
|
1127
1127
|
// }
|
|
1128
|
+
match(...args) {
|
|
1129
|
+
return this.toString().match(...args);
|
|
1130
|
+
}
|
|
1131
|
+
split(...args) {
|
|
1132
|
+
return this.toString().split(...args);
|
|
1133
|
+
}
|
|
1128
1134
|
toString() {
|
|
1129
1135
|
return this.join('\n');
|
|
1130
1136
|
}
|
package/node.test.js
CHANGED
|
@@ -533,10 +533,10 @@ var $;
|
|
|
533
533
|
static wrap(task) {
|
|
534
534
|
const store = new WeakMap();
|
|
535
535
|
const fun = function (next) {
|
|
536
|
-
if (next === undefined && store.has(this))
|
|
537
|
-
return store.get(this);
|
|
536
|
+
if (next === undefined && store.has(this ?? fun))
|
|
537
|
+
return store.get(this ?? fun);
|
|
538
538
|
const val = task.call(this, next) ?? next;
|
|
539
|
-
store.set(this, val);
|
|
539
|
+
store.set(this ?? fun, val);
|
|
540
540
|
return val;
|
|
541
541
|
};
|
|
542
542
|
Reflect.defineProperty(fun, 'name', { value: task.name + ' ' });
|
|
@@ -1116,6 +1116,12 @@ var $;
|
|
|
1116
1116
|
// [ Symbol.toPrimitive ]() {
|
|
1117
1117
|
// return this.toString()
|
|
1118
1118
|
// }
|
|
1119
|
+
match(...args) {
|
|
1120
|
+
return this.toString().match(...args);
|
|
1121
|
+
}
|
|
1122
|
+
split(...args) {
|
|
1123
|
+
return this.toString().split(...args);
|
|
1124
|
+
}
|
|
1119
1125
|
toString() {
|
|
1120
1126
|
return this.join('\n');
|
|
1121
1127
|
}
|