mol_conform 0.0.38 → 0.0.39
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.d.ts +1 -0
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js.map +1 -1
- package/node.test.js +2 -2
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js.map +1 -1
- package/web.test.js +205 -1
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.d.ts
CHANGED
package/web.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../mam.d.ts","../conform.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["../../../mam.d.ts","../conform.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":[null,null]}
|
package/web.deps.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/conform/readme.md","mol/conform/conform.ts"],"mods":{},"deps_in":{"mol":{"mol/conform":-999},"":{"mol":-999}},"deps_out":{"mol/conform":{"mol":-999},"mol":{"":-999}},"sloc":{"ts":
|
|
1
|
+
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/conform/readme.md","mol/conform/conform.ts"],"mods":{},"deps_in":{"mol":{"mol/conform":-999},"":{"mol":-999}},"deps_out":{"mol/conform":{"mol":-999},"mol":{"":-999}},"sloc":{"ts":87,"LICENSE":113,"md":492,"js":9,"json":83,"tree":41,"CNAME":1},"deps":{"mol/conform":{"..":-999,"/mol/conform/stack":-1,"/mol/conform":-1,"/mol/conform/handlers/get":-2,"/mol/conform/stack/index/of":-2,"/mol/conform/stack/push":-2,"/mol/conform/stack/pop":-2,"/mol/conform/handlers":-1,"/mol/conform/handler":-1,"/mol/conform/handlers/set":-2,"/mol/conform/array":-1},"mol":{"..":-999},"":{}}}
|
package/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["-","../../../mam.ts","../../../mol/conform/conform.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,
|
|
1
|
+
{"version":3,"sources":["-","../../../mam.ts","../../../mol/conform/conform.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAQV;AARD,WAAU,CAAC;AAQX,CAAC,EARS,CAAC,KAAD,CAAC,QAQV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADflB;AACA;AACA;;;;;;;;;;;;;;;AEFA,IAAU,CAAC,CA4GV;AA5GD,WAAU,CAAC;IAEV,MAAM,KAAK,GAAG,IAAI,OAAO,EAAmB,CAAA;IAE/B,oBAAkB,GAAG,EAAW,CAAA;IAE7C,SAAgB,YAAY,CAAqB,MAAe,EAAG,MAAe;QAEjF,IAAI,MAAM,CAAC,EAAE,CAAE,MAAM,EAAG,MAAM,CAAE;YAAG,OAAO,MA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esContent":[null,"Error.stackTraceLimit = 50;\n\ndeclare let _$_: { new(): {} } & typeof globalThis\ndeclare class $ extends _$_ {}\n\nnamespace $ {\n\texport type $ = typeof $$\n\texport declare class $$ extends $ {\n\t\tstatic $: $\n\t}\n\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n","namespace $ {\n\n\tconst cache = new WeakMap< any , boolean >()\n\n\texport const $mol_conform_stack = [] as any[]\n\n\texport function $mol_conform< Target , Source >( target : Target , source : Source ) : Target {\n\n\t\tif( Object.is( target , source ) ) return source as any\n\n\t\tif( !target || typeof target !== 'object' ) return target\n\t\tif( !source || typeof source !== 'object' ) return target\n\n\t\tif( target instanceof Error ) return target\n\t\tif( source instanceof Error ) return target\n\t\t\n\t\tif( target['constructor'] !== source['constructor'] ) return target\n\n\t\tif( cache.get( target ) ) return target\n\t\tcache.set( target , true )\n\t\t\n\t\tconst conform = $mol_conform_handlers.get( target['constructor'] )\n\t\tif( !conform ) return target\n\n\t\tif( $mol_conform_stack.indexOf( target ) !== -1 ) return target\n\n\t\t$mol_conform_stack.push( target )\n\n\t\ttry { return conform( target , source ) }\n\t\tfinally { $mol_conform_stack.pop() }\n\n\t}\n\n\texport const $mol_conform_handlers = new WeakMap< Object , ( target : any , source : any )=> any >()\n\n\texport function $mol_conform_handler< Class >(\n\t\tcl : { new( ... args : any[] ) : Class } ,\n\t\thandler : ( target : Class , source : Class )=> Class ,\n\t) {\n\t\t$mol_conform_handlers.set( cl , handler )\n\t}\n\n\texport function $mol_conform_array<\n\t\tValue ,\n\t\tList extends {\n\t\t\t[ index : number ] : Value\n\t\t\tlength : number\n\t\t} ,\n\t>( target : List , source : List ) {\n\t\t\n\t\tif( source.length !== target.length ) return target\n\t\t\n\t\tfor( let i = 0 ; i < target.length ; ++i ) {\n\t\t\tif( !Object.is( source[i] , target[i] ) ) return target\n\t\t}\n\n\t\treturn source\n\t}\n\n\t$mol_conform_handler( Array , $mol_conform_array )\n\t\n\t$mol_conform_handler( Int8Array , $mol_conform_array )\n\t$mol_conform_handler( Int16Array , $mol_conform_array )\n\t$mol_conform_handler( Int32Array , $mol_conform_array )\n\t$mol_conform_handler( BigInt64Array , $mol_conform_array )\n\t\n\t$mol_conform_handler( Uint8Array , $mol_conform_array )\n\t$mol_conform_handler( Uint16Array , $mol_conform_array )\n\t$mol_conform_handler( Uint32Array , $mol_conform_array )\n\t$mol_conform_handler( BigUint64Array , $mol_conform_array )\n\n\t$mol_conform_handler( Float32Array , $mol_conform_array )\n\t$mol_conform_handler( Float64Array , $mol_conform_array )\n\n\t$mol_conform_handler( ({})['constructor'] as any , ( target: Object, source )=> {\n\n\t\tlet count = 0\n\t\tlet equal = true\n\n\t\tfor( let key in target ) {\n\n\t\t\tconst conformed = $mol_conform( target[ key as never ] , source[ key as never ] )\n\t\t\t\n\t\t\tif( conformed !== target[ key as never ] ) {\n\t\t\t\ttry { target[ key as never ] = conformed } catch( error: any ) {}\n\t\t\t\tif( !Object.is( conformed , target[ key as never ] ) ) equal = false\n\t\t\t}\n\t\t\t\n\t\t\tif( !Object.is( conformed , source[ key as never ] ) ) equal = false\n\t\t\t\n\t\t\t++ count\n\t\t}\n\n\t\tfor( let key in source ) if( -- count < 0 ) break\n\n\t\treturn ( equal && count === 0 ) ? source : target\n\t} )\n\n\t$mol_conform_handler( Date , ( target , source )=> {\n\t\tif( target.getTime() === source.getTime() ) return source\n\t\treturn target \n\t} )\n\n\t$mol_conform_handler( RegExp , ( target , source )=> {\n\t\tif( target.toString() === source.toString() ) return source\n\t\treturn target\n\t} )\n\n}\n"]}
|
package/web.test.js
CHANGED
|
@@ -1023,6 +1023,210 @@ var $;
|
|
|
1023
1023
|
});
|
|
1024
1024
|
})($ || ($ = {}));
|
|
1025
1025
|
|
|
1026
|
+
;
|
|
1027
|
+
"use strict";
|
|
1028
|
+
var $;
|
|
1029
|
+
(function ($) {
|
|
1030
|
+
$['devtoolsFormatters'] ||= [];
|
|
1031
|
+
function $mol_dev_format_register(config) {
|
|
1032
|
+
$['devtoolsFormatters'].push(config);
|
|
1033
|
+
}
|
|
1034
|
+
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
1035
|
+
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
1036
|
+
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
1037
|
+
function $mol_dev_format_button(label, click) {
|
|
1038
|
+
return $mol_dev_format_auto({
|
|
1039
|
+
[$.$mol_dev_format_head]() {
|
|
1040
|
+
return $mol_dev_format_span({ color: 'cornflowerblue' }, label);
|
|
1041
|
+
},
|
|
1042
|
+
[$.$mol_dev_format_body]() {
|
|
1043
|
+
Promise.resolve().then(click);
|
|
1044
|
+
return $mol_dev_format_span({});
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
$mol_dev_format_register({
|
|
1049
|
+
header: (val, config = false) => {
|
|
1050
|
+
if (config)
|
|
1051
|
+
return null;
|
|
1052
|
+
if (!val)
|
|
1053
|
+
return null;
|
|
1054
|
+
if ($.$mol_dev_format_head in val) {
|
|
1055
|
+
try {
|
|
1056
|
+
return val[$.$mol_dev_format_head]();
|
|
1057
|
+
}
|
|
1058
|
+
catch (error) {
|
|
1059
|
+
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
if (typeof val === 'function') {
|
|
1063
|
+
return $mol_dev_format_native(val);
|
|
1064
|
+
}
|
|
1065
|
+
if (val instanceof Error) {
|
|
1066
|
+
return $mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
|
|
1067
|
+
}
|
|
1068
|
+
if (val instanceof Promise) {
|
|
1069
|
+
return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
|
|
1070
|
+
}
|
|
1071
|
+
if (Symbol.toStringTag in val) {
|
|
1072
|
+
return $mol_dev_format_native(val);
|
|
1073
|
+
}
|
|
1074
|
+
return null;
|
|
1075
|
+
},
|
|
1076
|
+
hasBody: (val, config = false) => {
|
|
1077
|
+
if (config)
|
|
1078
|
+
return false;
|
|
1079
|
+
if (!val)
|
|
1080
|
+
return false;
|
|
1081
|
+
if (val[$.$mol_dev_format_body])
|
|
1082
|
+
return true;
|
|
1083
|
+
return false;
|
|
1084
|
+
},
|
|
1085
|
+
body: (val, config = false) => {
|
|
1086
|
+
if (config)
|
|
1087
|
+
return null;
|
|
1088
|
+
if (!val)
|
|
1089
|
+
return null;
|
|
1090
|
+
if ($.$mol_dev_format_body in val) {
|
|
1091
|
+
try {
|
|
1092
|
+
return val[$.$mol_dev_format_body]();
|
|
1093
|
+
}
|
|
1094
|
+
catch (error) {
|
|
1095
|
+
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
return null;
|
|
1099
|
+
},
|
|
1100
|
+
});
|
|
1101
|
+
function $mol_dev_format_native(obj) {
|
|
1102
|
+
if (typeof obj === 'undefined')
|
|
1103
|
+
return $.$mol_dev_format_shade('undefined');
|
|
1104
|
+
return [
|
|
1105
|
+
'object',
|
|
1106
|
+
{
|
|
1107
|
+
object: obj,
|
|
1108
|
+
config: true,
|
|
1109
|
+
},
|
|
1110
|
+
];
|
|
1111
|
+
}
|
|
1112
|
+
$.$mol_dev_format_native = $mol_dev_format_native;
|
|
1113
|
+
function $mol_dev_format_auto(obj) {
|
|
1114
|
+
if (obj == null)
|
|
1115
|
+
return $.$mol_dev_format_shade(String(obj));
|
|
1116
|
+
return [
|
|
1117
|
+
'object',
|
|
1118
|
+
{
|
|
1119
|
+
object: obj,
|
|
1120
|
+
config: false,
|
|
1121
|
+
},
|
|
1122
|
+
];
|
|
1123
|
+
}
|
|
1124
|
+
$.$mol_dev_format_auto = $mol_dev_format_auto;
|
|
1125
|
+
function $mol_dev_format_element(element, style, ...content) {
|
|
1126
|
+
const styles = [];
|
|
1127
|
+
for (let key in style)
|
|
1128
|
+
styles.push(`${key} : ${style[key]}`);
|
|
1129
|
+
return [
|
|
1130
|
+
element,
|
|
1131
|
+
{
|
|
1132
|
+
style: styles.join(' ; '),
|
|
1133
|
+
},
|
|
1134
|
+
...content,
|
|
1135
|
+
];
|
|
1136
|
+
}
|
|
1137
|
+
$.$mol_dev_format_element = $mol_dev_format_element;
|
|
1138
|
+
function $mol_dev_format_span(style, ...content) {
|
|
1139
|
+
return $mol_dev_format_element('span', {
|
|
1140
|
+
...style,
|
|
1141
|
+
}, ...content);
|
|
1142
|
+
}
|
|
1143
|
+
$.$mol_dev_format_span = $mol_dev_format_span;
|
|
1144
|
+
$.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
|
|
1145
|
+
$.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
|
|
1146
|
+
$.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
|
|
1147
|
+
$.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
|
|
1148
|
+
$.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
|
|
1149
|
+
$.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
|
|
1150
|
+
$.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
|
|
1151
|
+
'color': 'magenta',
|
|
1152
|
+
});
|
|
1153
|
+
$.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
|
|
1154
|
+
'font-weight': 'bold',
|
|
1155
|
+
});
|
|
1156
|
+
$.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
|
|
1157
|
+
'color': 'green',
|
|
1158
|
+
});
|
|
1159
|
+
$.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
|
|
1160
|
+
'color': 'gray',
|
|
1161
|
+
});
|
|
1162
|
+
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
1163
|
+
'margin-left': '13px'
|
|
1164
|
+
});
|
|
1165
|
+
class Stack extends Array {
|
|
1166
|
+
toString() {
|
|
1167
|
+
return this.join('\n');
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
class Call extends Object {
|
|
1171
|
+
type;
|
|
1172
|
+
function;
|
|
1173
|
+
method;
|
|
1174
|
+
eval;
|
|
1175
|
+
source;
|
|
1176
|
+
offset;
|
|
1177
|
+
pos;
|
|
1178
|
+
object;
|
|
1179
|
+
flags;
|
|
1180
|
+
[Symbol.toStringTag];
|
|
1181
|
+
constructor(call) {
|
|
1182
|
+
super();
|
|
1183
|
+
this.type = call.getTypeName() ?? '';
|
|
1184
|
+
this.function = call.getFunctionName() ?? '';
|
|
1185
|
+
this.method = call.getMethodName() ?? '';
|
|
1186
|
+
if (this.method === this.function)
|
|
1187
|
+
this.method = '';
|
|
1188
|
+
this.pos = [call.getEnclosingLineNumber() ?? 0, call.getEnclosingColumnNumber() ?? 0];
|
|
1189
|
+
this.eval = call.getEvalOrigin() ?? '';
|
|
1190
|
+
this.source = call.getScriptNameOrSourceURL() ?? '';
|
|
1191
|
+
this.object = call.getThis();
|
|
1192
|
+
this.offset = call.getPosition();
|
|
1193
|
+
const flags = [];
|
|
1194
|
+
if (call.isAsync())
|
|
1195
|
+
flags.push('async');
|
|
1196
|
+
if (call.isConstructor())
|
|
1197
|
+
flags.push('constructor');
|
|
1198
|
+
if (call.isEval())
|
|
1199
|
+
flags.push('eval');
|
|
1200
|
+
if (call.isNative())
|
|
1201
|
+
flags.push('native');
|
|
1202
|
+
if (call.isPromiseAll())
|
|
1203
|
+
flags.push('PromiseAll');
|
|
1204
|
+
if (call.isToplevel())
|
|
1205
|
+
flags.push('top');
|
|
1206
|
+
this.flags = flags;
|
|
1207
|
+
const type = this.type ? this.type + '.' : '';
|
|
1208
|
+
const func = this.function || '<anon>';
|
|
1209
|
+
const method = this.method ? ' [' + this.method + '] ' : '';
|
|
1210
|
+
this[Symbol.toStringTag] = `${type}${func}${method}`;
|
|
1211
|
+
}
|
|
1212
|
+
[Symbol.toPrimitive]() {
|
|
1213
|
+
return this.toString();
|
|
1214
|
+
}
|
|
1215
|
+
toString() {
|
|
1216
|
+
const object = this.object || '';
|
|
1217
|
+
const label = this[Symbol.toStringTag];
|
|
1218
|
+
const source = `${this.source}:${this.pos.join(':')} #${this.offset}`;
|
|
1219
|
+
return `\tat ${object}${label} (${source})`;
|
|
1220
|
+
}
|
|
1221
|
+
[$.$mol_dev_format_head]() {
|
|
1222
|
+
return $.$mol_dev_format_div({}, $mol_dev_format_native(this), $.$mol_dev_format_shade(' '), ...this.object ? [
|
|
1223
|
+
$mol_dev_format_native(this.object),
|
|
1224
|
+
] : [], ...this.method ? [$.$mol_dev_format_shade(' ', ' [', this.method, ']')] : [], $.$mol_dev_format_shade(' ', this.flags.join(', ')));
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
Error.prepareStackTrace ??= (error, stack) => new Stack(...stack.map(call => new Call(call)));
|
|
1228
|
+
})($ || ($ = {}));
|
|
1229
|
+
|
|
1026
1230
|
;
|
|
1027
1231
|
"use strict";
|
|
1028
1232
|
var $;
|
|
@@ -1132,7 +1336,7 @@ var $;
|
|
|
1132
1336
|
var $;
|
|
1133
1337
|
(function ($) {
|
|
1134
1338
|
function $mol_log3_area_lazy(event) {
|
|
1135
|
-
const self = this
|
|
1339
|
+
const self = this.$;
|
|
1136
1340
|
const stack = self.$mol_log3_stack;
|
|
1137
1341
|
const deep = stack.length;
|
|
1138
1342
|
let logged = false;
|