mol_mutable 0.0.50 → 0.0.52
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 +13 -13
- package/node.js.map +1 -1
- package/node.mjs +13 -13
- package/node.mjs.map +1 -1
- package/node.test.js +377 -377
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +13 -13
- package/web.js.map +1 -1
- package/web.mjs +13 -13
- package/web.mjs.map +1 -1
- package/web.test.js +235 -235
- package/web.test.js.map +1 -1
package/node.deps.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":["LICENSE","README.md","
|
|
1
|
+
{"files":["mam.ts","LICENSE","README.md","yarn.lock","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/index.html","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/type/README.md","mol/type/immutable/deep/deep/deep.ts","mol/mutable/README.md","mol/mutable/mutable.ts"],"mods":{},"deps_in":{"mol":{"mol/mutable":-9007199254740991,"mol/type":-9007199254740991},"":{"mol":-9007199254740991},"mol/type/immutable/deep/deep":{"mol/mutable":-2},"mol/type/immutable/deep":{"mol/type/immutable/deep/deep":-9007199254740991},"mol/type/immutable":{"mol/type/immutable/deep":-9007199254740991},"mol/type":{"mol/type/immutable":-9007199254740991}},"deps_out":{"mol/mutable":{"mol":-9007199254740991,"mol/type/immutable/deep/deep":-2},"mol":{"":-9007199254740991},"mol/type/immutable/deep/deep":{"mol/type/immutable/deep":-9007199254740991},"mol/type/immutable/deep":{"mol/type/immutable":-9007199254740991},"mol/type/immutable":{"mol/type":-9007199254740991},"mol/type":{"mol":-9007199254740991}},"sloc":{"ts":50,"LICENSE":113,"md":508,"lock":985,"js":9,"json":93,"tree":31,"CNAME":1,"html":1},"deps":{"mol/mutable":{"..":-9007199254740991,"/mol/mutable/wrapper":-1,"/mol/type/immutable/deep":-2,"/mol/mutable":-1},"mol":{"..":-9007199254740991},"":{},"mol/type/immutable/deep/deep":{"..":-9007199254740991,"/mol/type/immutable/deep":-1},"mol/type/immutable/deep":{"..":-9007199254740991},"mol/type/immutable":{"..":-9007199254740991},"mol/type":{"..":-9007199254740991}}}
|
package/node.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var exports = void 0;
|
|
3
|
-
"use strict"
|
|
4
|
-
|
|
5
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
|
|
13
|
-
$.$$ = $
|
|
14
|
-
|
|
15
|
-
;
|
|
16
3
|
|
|
17
4
|
var $node = $node || {}
|
|
18
5
|
void function( module ) { var exports = module.exports = this; function require( id ) { return $node[ id.replace( /^.\// , "../" ) ] };
|
|
@@ -27,6 +14,19 @@ module.exports = $;
|
|
|
27
14
|
;
|
|
28
15
|
|
|
29
16
|
$node[ "../mam.ts" ] = $node[ "../mam.ts" ] = module.exports }.call( {} , {} )
|
|
17
|
+
;
|
|
18
|
+
"use strict"
|
|
19
|
+
|
|
20
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
|
|
28
|
+
$.$$ = $
|
|
29
|
+
|
|
30
30
|
;
|
|
31
31
|
"use strict";
|
|
32
32
|
//mol/type/immutable/deep/deep/deep.ts
|
package/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../mam.
|
|
1
|
+
{"version":3,"sources":["-","../../../mam.ts","../../../mam.jam.js","../../type/immutable/deep/deep/deep.ts","../mol/mutable/mutable.ts"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;AAMX,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADblB;AACA;AACA;AEFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;;ACFA,IAAU,CAAC,CAuCV;AAvCD,WAAU,CAAC;IAUV,SAAgB,YAAY,CAC3B,KAAY,EACZ,SAAkC,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI;QAGtD,IAAI,MAAM,GAAG,SAA8B,CAAA;QAE3C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAE,KAAK,CAAE;YACnC,CAAC,CAAC,GAAE,EAAE,CAAC,CAAE,GAAI,KAAY,CAAW;YACpC,CAAC,CAAC,GAAE,EAAE,CAAC,CAAC,EAAE,GAAI,KAAK,EAAE,CAAC,CAAA;QAEvB,OAAO,IAAI,KAAK,CAAE,YAAY,EAAE;YAE/B,GAAG,EAAE,CAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CACxB,KAAK,CAAE,KAAK,CAAE,EACd,IAAI,CAAC,EAAE,CAAC,CAAE,MAAM,IAAI,CAAE,MAAM,GAAG,MAAM,CAAE,KAAK,EAAE,CAAE,CAAE,CAAE,CAAE,KAAK,CAAE,GAAG,IAAI,CACpE;YAED,GAAG,EAAE,GAAE,EAAE,CAAC,KAAK;YAEf,KAAK,EAAE,CAAE,GAAG,EAAE,IAAI,EAAE,CAAE,KAAK,CAAE,EAAE,EAAE;gBAChC,IAAI,KAAK;oBAAG,MAAM,CAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAE,KAAK,CAAE,CAAE,CAAA;gBACrD,OAAO,MAAM,IAAI,KAAK,CAAA;YACvB,CAAC;SAED,CAAS,CAAA;IAEX,CAAC;IA3Be,cAAY,eA2B3B,CAAA;AAEF,CAAC,EAvCS,CAAC,KAAD,CAAC,QAuCV;;","file":"node.js","sourcesContent":[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\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n",null,null,"namespace $ {\n\t\n\texport type $mol_mutable_wrapper< Value > = {\n\t\t(\n\t\t\tpatch?: ( next: $mol_type_immutable_deep< Value > )=> $mol_type_immutable_deep< Value >\n\t\t): $mol_type_immutable_deep< Value >\n\t} & {\n\t\t[ Field in keyof Value ]: $mol_mutable_wrapper< Value[ Field ] >\n\t}\n\t\n\texport function $mol_mutable< Value >(\n\t\tinput: Value,\n\t\tupdate: ( next: Value )=> Value = next => input = next,\n\t): $mol_mutable_wrapper< Value > {\n\t\t\n\t\tlet output = undefined as undefined | Value\n\t\t\n\t\tconst clone = Array.isArray( input )\n\t\t\t? ()=> [ ... input as any ] as Value\n\t\t\t: ()=> ({ ... input })\n\t\t\n\t\treturn new Proxy( $mol_mutable, {\n\t\t\t\n\t\t\tget: ( Mut, field )=> Mut(\n\t\t\t\tinput[ field ],\n\t\t\t\tnext => ( output ?? ( output = update( clone() ) ) )[ field ] = next,\n\t\t\t),\n\t\t\t\n\t\t\tset: ()=> false,\n\t\t\t\n\t\t\tapply: ( Mut, self, [ patch ] )=> {\n\t\t\t\tif( patch ) update( output = input = patch( input ) )\n\t\t\t\treturn output ?? input\n\t\t\t},\n\t\t\t\n\t\t} ) as any\n\t\t\n\t}\n\t\n}"]}
|
package/node.mjs
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var exports = void 0;
|
|
3
|
-
"use strict"
|
|
4
|
-
|
|
5
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
|
|
13
|
-
$.$$ = $
|
|
14
|
-
|
|
15
|
-
;
|
|
16
3
|
|
|
17
4
|
var $node = $node || {}
|
|
18
5
|
void function( module ) { var exports = module.exports = this; function require( id ) { return $node[ id.replace( /^.\// , "../" ) ] };
|
|
@@ -27,6 +14,19 @@ module.exports = $;
|
|
|
27
14
|
;
|
|
28
15
|
|
|
29
16
|
$node[ "../mam.ts" ] = $node[ "../mam.ts" ] = module.exports }.call( {} , {} )
|
|
17
|
+
;
|
|
18
|
+
"use strict"
|
|
19
|
+
|
|
20
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
|
|
28
|
+
$.$$ = $
|
|
29
|
+
|
|
30
30
|
;
|
|
31
31
|
"use strict";
|
|
32
32
|
//mol/type/immutable/deep/deep/deep.ts
|
package/node.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../mam.
|
|
1
|
+
{"version":3,"sources":["-","../../../mam.ts","../../../mam.jam.js","../../type/immutable/deep/deep/deep.ts","../mol/mutable/mutable.ts"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;AAMX,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADblB;AACA;AACA;AEFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;;ACFA,IAAU,CAAC,CAuCV;AAvCD,WAAU,CAAC;IAUV,SAAgB,YAAY,CAC3B,KAAY,EACZ,SAAkC,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI;QAGtD,IAAI,MAAM,GAAG,SAA8B,CAAA;QAE3C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAE,KAAK,CAAE;YACnC,CAAC,CAAC,GAAE,EAAE,CAAC,CAAE,GAAI,KAAY,CAAW;YACpC,CAAC,CAAC,GAAE,EAAE,CAAC,CAAC,EAAE,GAAI,KAAK,EAAE,CAAC,CAAA;QAEvB,OAAO,IAAI,KAAK,CAAE,YAAY,EAAE;YAE/B,GAAG,EAAE,CAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CACxB,KAAK,CAAE,KAAK,CAAE,EACd,IAAI,CAAC,EAAE,CAAC,CAAE,MAAM,IAAI,CAAE,MAAM,GAAG,MAAM,CAAE,KAAK,EAAE,CAAE,CAAE,CAAE,CAAE,KAAK,CAAE,GAAG,IAAI,CACpE;YAED,GAAG,EAAE,GAAE,EAAE,CAAC,KAAK;YAEf,KAAK,EAAE,CAAE,GAAG,EAAE,IAAI,EAAE,CAAE,KAAK,CAAE,EAAE,EAAE;gBAChC,IAAI,KAAK;oBAAG,MAAM,CAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAE,KAAK,CAAE,CAAE,CAAA;gBACrD,OAAO,MAAM,IAAI,KAAK,CAAA;YACvB,CAAC;SAED,CAAS,CAAA;IAEX,CAAC;IA3Be,cAAY,eA2B3B,CAAA;AAEF,CAAC,EAvCS,CAAC,KAAD,CAAC,QAuCV;;;AJvCD","file":"node.mjs","sourcesContent":[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\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n",null,null,"namespace $ {\n\t\n\texport type $mol_mutable_wrapper< Value > = {\n\t\t(\n\t\t\tpatch?: ( next: $mol_type_immutable_deep< Value > )=> $mol_type_immutable_deep< Value >\n\t\t): $mol_type_immutable_deep< Value >\n\t} & {\n\t\t[ Field in keyof Value ]: $mol_mutable_wrapper< Value[ Field ] >\n\t}\n\t\n\texport function $mol_mutable< Value >(\n\t\tinput: Value,\n\t\tupdate: ( next: Value )=> Value = next => input = next,\n\t): $mol_mutable_wrapper< Value > {\n\t\t\n\t\tlet output = undefined as undefined | Value\n\t\t\n\t\tconst clone = Array.isArray( input )\n\t\t\t? ()=> [ ... input as any ] as Value\n\t\t\t: ()=> ({ ... input })\n\t\t\n\t\treturn new Proxy( $mol_mutable, {\n\t\t\t\n\t\t\tget: ( Mut, field )=> Mut(\n\t\t\t\tinput[ field ],\n\t\t\t\tnext => ( output ?? ( output = update( clone() ) ) )[ field ] = next,\n\t\t\t),\n\t\t\t\n\t\t\tset: ()=> false,\n\t\t\t\n\t\t\tapply: ( Mut, self, [ patch ] )=> {\n\t\t\t\tif( patch ) update( output = input = patch( input ) )\n\t\t\t\treturn output ?? input\n\t\t\t},\n\t\t\t\n\t\t} ) as any\n\t\t\n\t}\n\t\n}"]}
|