@rimbu/deep 1.0.0-alpha.2 → 1.1.0
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/dist/bun/selector.mts +2 -1
- package/dist/cjs/deep.cjs +4 -4
- package/dist/cjs/index.cjs +4 -4
- package/dist/cjs/internal.cjs +4 -4
- package/dist/cjs/path.cjs +9 -9
- package/dist/cjs/selector.cjs +4 -4
- package/dist/esm/selector.mjs +1 -1
- package/dist/esm/selector.mjs.map +1 -1
- package/dist/types/selector.d.mts +1 -1
- package/package.json +5 -5
- package/src/selector.mts +2 -1
package/dist/bun/selector.mts
CHANGED
package/dist/cjs/deep.cjs
CHANGED
|
@@ -41,12 +41,12 @@ module.exports = __toCommonJS(deep_exports);
|
|
|
41
41
|
|
|
42
42
|
// src/path.mts
|
|
43
43
|
var Path;
|
|
44
|
-
((
|
|
45
|
-
|
|
44
|
+
((Path2) => {
|
|
45
|
+
Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
|
|
46
46
|
function stringSplit(path) {
|
|
47
|
-
return path.split(
|
|
47
|
+
return path.split(Path2.stringSplitRegex);
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
Path2.stringSplit = stringSplit;
|
|
50
50
|
})(Path || (Path = {}));
|
|
51
51
|
function getAt(source, path) {
|
|
52
52
|
if (path === "") {
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -90,12 +90,12 @@ var Tuple;
|
|
|
90
90
|
|
|
91
91
|
// src/path.mts
|
|
92
92
|
var Path;
|
|
93
|
-
((
|
|
94
|
-
|
|
93
|
+
((Path2) => {
|
|
94
|
+
Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
|
|
95
95
|
function stringSplit(path) {
|
|
96
|
-
return path.split(
|
|
96
|
+
return path.split(Path2.stringSplitRegex);
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
Path2.stringSplit = stringSplit;
|
|
99
99
|
})(Path || (Path = {}));
|
|
100
100
|
function getAt(source, path) {
|
|
101
101
|
if (path === "") {
|
package/dist/cjs/internal.cjs
CHANGED
|
@@ -27,12 +27,12 @@ module.exports = __toCommonJS(internal_exports);
|
|
|
27
27
|
|
|
28
28
|
// src/path.mts
|
|
29
29
|
var Path;
|
|
30
|
-
((
|
|
31
|
-
|
|
30
|
+
((Path2) => {
|
|
31
|
+
Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
|
|
32
32
|
function stringSplit(path) {
|
|
33
|
-
return path.split(
|
|
33
|
+
return path.split(Path2.stringSplitRegex);
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
Path2.stringSplit = stringSplit;
|
|
36
36
|
})(Path || (Path = {}));
|
|
37
37
|
function getAt(source, path) {
|
|
38
38
|
if (path === "") {
|
package/dist/cjs/path.cjs
CHANGED
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/path.mts
|
|
21
21
|
var path_exports = {};
|
|
22
22
|
__export(path_exports, {
|
|
23
|
-
Path: () =>
|
|
23
|
+
Path: () => Path,
|
|
24
24
|
getAt: () => getAt,
|
|
25
25
|
patchAt: () => patchAt
|
|
26
26
|
});
|
|
@@ -526,19 +526,19 @@ function withType() {
|
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
// src/path.mts
|
|
529
|
-
var
|
|
530
|
-
((
|
|
531
|
-
|
|
529
|
+
var Path;
|
|
530
|
+
((Path2) => {
|
|
531
|
+
Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
|
|
532
532
|
function stringSplit(path) {
|
|
533
|
-
return path.split(
|
|
533
|
+
return path.split(Path2.stringSplitRegex);
|
|
534
534
|
}
|
|
535
|
-
|
|
536
|
-
})(
|
|
535
|
+
Path2.stringSplit = stringSplit;
|
|
536
|
+
})(Path || (Path = {}));
|
|
537
537
|
function getAt(source, path) {
|
|
538
538
|
if (path === "") {
|
|
539
539
|
return source;
|
|
540
540
|
}
|
|
541
|
-
const items =
|
|
541
|
+
const items = Path.stringSplit(path);
|
|
542
542
|
let result = source;
|
|
543
543
|
for (const item of items) {
|
|
544
544
|
if (void 0 === item || item === "" || item === "[") {
|
|
@@ -555,7 +555,7 @@ function patchAt(source, path, patchItem) {
|
|
|
555
555
|
if (path === "") {
|
|
556
556
|
return deep_exports.patch(source, patchItem);
|
|
557
557
|
}
|
|
558
|
-
const items =
|
|
558
|
+
const items = Path.stringSplit(path);
|
|
559
559
|
function createPatchPart(index, target) {
|
|
560
560
|
if (index === items.length) {
|
|
561
561
|
return patchItem;
|
package/dist/cjs/selector.cjs
CHANGED
|
@@ -26,12 +26,12 @@ module.exports = __toCommonJS(selector_exports);
|
|
|
26
26
|
|
|
27
27
|
// src/path.mts
|
|
28
28
|
var Path;
|
|
29
|
-
((
|
|
30
|
-
|
|
29
|
+
((Path2) => {
|
|
30
|
+
Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
|
|
31
31
|
function stringSplit(path) {
|
|
32
|
-
return path.split(
|
|
32
|
+
return path.split(Path2.stringSplitRegex);
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
Path2.stringSplit = stringSplit;
|
|
35
35
|
})(Path || (Path = {}));
|
|
36
36
|
function getAt(source, path) {
|
|
37
37
|
if (path === "") {
|
package/dist/esm/selector.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector.mjs","sourceRoot":"","sources":["../../src/selector.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"selector.mjs","sourceRoot":"","sources":["../../src/selector.mts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAA6B,MAAM,gBAAgB,CAAC;AAkDjE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,MAAM,CACpB,MAAS,EACT,QAA4B;IAE5B,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QAClC,kDAAkD;QAClD,OAAQ,QAAgB,CAAC,MAAsB,CAAC,CAAC;KAClD;SAAM,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QACvC,2DAA2D;QAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,QAAuB,CAAQ,CAAC;KAC3D;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAClC,+CAA+C;QAC/C,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAQ,CAAC;KACtD;IAED,qBAAqB;IAErB,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,KAAK,MAAM,GAAG,IAAI,QAAe,EAAE;QACjC,qDAAqD;QACrD,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAG,QAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;KACtD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimbu/deep",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Tools to use handle plain JS objects as immutable objects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"immutable",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"typecheck": "tsc"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@rimbu/base": "^1.
|
|
76
|
-
"@rimbu/common": "^1.
|
|
77
|
-
"tslib": "^2.
|
|
75
|
+
"@rimbu/base": "^1.1.0",
|
|
76
|
+
"@rimbu/common": "^1.1.0",
|
|
77
|
+
"tslib": "^2.6.1"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "f0a61c7e2ba7ecc76dd56a57a9fe7e6ae059eb59"
|
|
83
83
|
}
|
package/src/selector.mts
CHANGED