mol_dump_lib 0.0.149 → 0.0.151
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 +5 -1
- package/node.js.map +1 -1
- package/node.mjs +5 -1
- package/node.test.js +6 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +26 -1
- package/web.deps.json +1 -1
- package/web.js +70 -4
- package/web.js.map +1 -1
- package/web.mjs +70 -4
- package/web.test.js +1 -53
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -879,11 +879,15 @@ var $;
|
|
|
879
879
|
(function ($) {
|
|
880
880
|
$.$mol_key_store = new WeakMap();
|
|
881
881
|
function $mol_key(value) {
|
|
882
|
+
if (typeof value === 'bigint')
|
|
883
|
+
return value.toString() + 'n';
|
|
882
884
|
if (!value)
|
|
883
885
|
return JSON.stringify(value);
|
|
884
886
|
if (typeof value !== 'object' && typeof value !== 'function')
|
|
885
887
|
return JSON.stringify(value);
|
|
886
888
|
return JSON.stringify(value, (field, value) => {
|
|
889
|
+
if (typeof value === 'bigint')
|
|
890
|
+
return value.toString() + 'n';
|
|
887
891
|
if (!value)
|
|
888
892
|
return value;
|
|
889
893
|
if (typeof value !== 'object' && typeof value !== 'function')
|
|
@@ -4592,16 +4596,78 @@ var $;
|
|
|
4592
4596
|
;
|
|
4593
4597
|
"use strict";
|
|
4594
4598
|
var $;
|
|
4599
|
+
(function ($) {
|
|
4600
|
+
function $mol_log3_area_lazy(event) {
|
|
4601
|
+
const self = this;
|
|
4602
|
+
const stack = self.$mol_log3_stack;
|
|
4603
|
+
const deep = stack.length;
|
|
4604
|
+
let logged = false;
|
|
4605
|
+
stack.push(() => {
|
|
4606
|
+
logged = true;
|
|
4607
|
+
self.$mol_log3_area.call(self, event);
|
|
4608
|
+
});
|
|
4609
|
+
return () => {
|
|
4610
|
+
if (logged)
|
|
4611
|
+
self.console.groupEnd();
|
|
4612
|
+
if (stack.length > deep)
|
|
4613
|
+
stack.length = deep;
|
|
4614
|
+
};
|
|
4615
|
+
}
|
|
4616
|
+
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
4617
|
+
$.$mol_log3_stack = [];
|
|
4618
|
+
})($ || ($ = {}));
|
|
4619
|
+
//mol/log3/log3.ts
|
|
4620
|
+
;
|
|
4621
|
+
"use strict";
|
|
4622
|
+
var $;
|
|
4623
|
+
(function ($) {
|
|
4624
|
+
function $mol_log3_web_make(level, color) {
|
|
4625
|
+
return function $mol_log3_logger(event) {
|
|
4626
|
+
const pending = this.$mol_log3_stack.pop();
|
|
4627
|
+
if (pending)
|
|
4628
|
+
pending();
|
|
4629
|
+
let tpl = '%c';
|
|
4630
|
+
const chunks = Object.values(event);
|
|
4631
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
4632
|
+
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
4633
|
+
}
|
|
4634
|
+
const style = `color:${color};font-weight:bolder`;
|
|
4635
|
+
this.console[level](tpl, style, ...chunks);
|
|
4636
|
+
const self = this;
|
|
4637
|
+
return () => self.console.groupEnd();
|
|
4638
|
+
};
|
|
4639
|
+
}
|
|
4640
|
+
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
4641
|
+
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
4642
|
+
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
4643
|
+
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
4644
|
+
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
4645
|
+
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
4646
|
+
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
4647
|
+
})($ || ($ = {}));
|
|
4648
|
+
//mol/log3/log3.web.ts
|
|
4649
|
+
;
|
|
4650
|
+
"use strict";
|
|
4651
|
+
var $;
|
|
4595
4652
|
(function ($) {
|
|
4596
4653
|
class $mol_storage extends $mol_object2 {
|
|
4597
4654
|
static native() {
|
|
4598
4655
|
return this.$.$mol_dom_context.navigator.storage;
|
|
4599
4656
|
}
|
|
4600
|
-
static persisted(next) {
|
|
4657
|
+
static persisted(next, cache) {
|
|
4601
4658
|
$mol_mem_persist();
|
|
4659
|
+
if (cache)
|
|
4660
|
+
return Boolean(next);
|
|
4602
4661
|
const native = this.native();
|
|
4603
|
-
if (next)
|
|
4604
|
-
native.persist()
|
|
4662
|
+
if (next && !$mol_mem_cached(() => this.persisted())) {
|
|
4663
|
+
native.persist().then(actual => {
|
|
4664
|
+
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
4665
|
+
if (actual)
|
|
4666
|
+
this.$.$mol_log3_rise({ place: this, message: `Persist` });
|
|
4667
|
+
else
|
|
4668
|
+
this.$.$mol_log3_fail({ place: this, message: `Non persist` });
|
|
4669
|
+
});
|
|
4670
|
+
}
|
|
4605
4671
|
return next ?? $mol_wire_sync(native).persisted();
|
|
4606
4672
|
}
|
|
4607
4673
|
static estimate() {
|
|
@@ -5536,7 +5602,7 @@ var $;
|
|
|
5536
5602
|
"use strict";
|
|
5537
5603
|
var $;
|
|
5538
5604
|
(function ($) {
|
|
5539
|
-
$mol_style_attach("mol/check/check.css", "[mol_check] {\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\talign-content: center;\n\
|
|
5605
|
+
$mol_style_attach("mol/check/check.css", "[mol_check] {\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\talign-content: center;\n\t/* align-items: flex-start; */\n\tborder: none;\n\tfont-weight: inherit;\n\tbox-shadow: none;\n\ttext-align: left;\n\tdisplay: inline-flex;\n\tflex-wrap: nowrap;\n}\n\n[mol_check_title] {\n\tflex-shrink: 1;\n}\n");
|
|
5540
5606
|
})($ || ($ = {}));
|
|
5541
5607
|
//mol/check/-css/check.css.ts
|
|
5542
5608
|
;
|
package/web.test.js
CHANGED
|
@@ -849,30 +849,6 @@ var $;
|
|
|
849
849
|
//mol/assert/assert.test.ts
|
|
850
850
|
;
|
|
851
851
|
"use strict";
|
|
852
|
-
var $;
|
|
853
|
-
(function ($) {
|
|
854
|
-
function $mol_log3_area_lazy(event) {
|
|
855
|
-
const self = this;
|
|
856
|
-
const stack = self.$mol_log3_stack;
|
|
857
|
-
const deep = stack.length;
|
|
858
|
-
let logged = false;
|
|
859
|
-
stack.push(() => {
|
|
860
|
-
logged = true;
|
|
861
|
-
self.$mol_log3_area.call(self, event);
|
|
862
|
-
});
|
|
863
|
-
return () => {
|
|
864
|
-
if (logged)
|
|
865
|
-
self.console.groupEnd();
|
|
866
|
-
if (stack.length > deep)
|
|
867
|
-
stack.length = deep;
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
871
|
-
$.$mol_log3_stack = [];
|
|
872
|
-
})($ || ($ = {}));
|
|
873
|
-
//mol/log3/log3.ts
|
|
874
|
-
;
|
|
875
|
-
"use strict";
|
|
876
852
|
//mol/type/equals/equals.test.ts
|
|
877
853
|
;
|
|
878
854
|
"use strict";
|
|
@@ -880,35 +856,6 @@ var $;
|
|
|
880
856
|
;
|
|
881
857
|
"use strict";
|
|
882
858
|
var $;
|
|
883
|
-
(function ($) {
|
|
884
|
-
function $mol_log3_web_make(level, color) {
|
|
885
|
-
return function $mol_log3_logger(event) {
|
|
886
|
-
const pending = this.$mol_log3_stack.pop();
|
|
887
|
-
if (pending)
|
|
888
|
-
pending();
|
|
889
|
-
let tpl = '%c';
|
|
890
|
-
const chunks = Object.values(event);
|
|
891
|
-
for (let i = 0; i < chunks.length; ++i) {
|
|
892
|
-
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
893
|
-
}
|
|
894
|
-
const style = `color:${color};font-weight:bolder`;
|
|
895
|
-
this.console[level](tpl, style, ...chunks);
|
|
896
|
-
const self = this;
|
|
897
|
-
return () => self.console.groupEnd();
|
|
898
|
-
};
|
|
899
|
-
}
|
|
900
|
-
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
901
|
-
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
902
|
-
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
903
|
-
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
904
|
-
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
905
|
-
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
906
|
-
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
907
|
-
})($ || ($ = {}));
|
|
908
|
-
//mol/log3/log3.web.ts
|
|
909
|
-
;
|
|
910
|
-
"use strict";
|
|
911
|
-
var $;
|
|
912
859
|
(function ($_1) {
|
|
913
860
|
$mol_test_mocks.push($ => {
|
|
914
861
|
$.$mol_log3_come = () => { };
|
|
@@ -2118,6 +2065,7 @@ var $;
|
|
|
2118
2065
|
$mol_assert_equal($mol_key(false), 'false');
|
|
2119
2066
|
$mol_assert_equal($mol_key(true), 'true');
|
|
2120
2067
|
$mol_assert_equal($mol_key(0), '0');
|
|
2068
|
+
$mol_assert_equal($mol_key(1n << 64n), '18446744073709551616n');
|
|
2121
2069
|
$mol_assert_equal($mol_key(''), '""');
|
|
2122
2070
|
},
|
|
2123
2071
|
'Array & POJO'() {
|