@rimbu/deep 1.0.0 → 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.
@@ -1,5 +1,6 @@
1
1
  import type { IsAnyFunc, IsArray } from '@rimbu/base';
2
- import { Deep, Path, type Protected } from './internal.mts';
2
+
3
+ import { Deep, type Path, type Protected } from './internal.mts';
3
4
 
4
5
  /**
5
6
  * Type defining the allowed selectors on an object of type `T`.
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
- ((Path3) => {
45
- Path3.stringSplitRegex = /\?\.|\.|\[|\]/g;
44
+ ((Path2) => {
45
+ Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
46
46
  function stringSplit(path) {
47
- return path.split(Path3.stringSplitRegex);
47
+ return path.split(Path2.stringSplitRegex);
48
48
  }
49
- Path3.stringSplit = stringSplit;
49
+ Path2.stringSplit = stringSplit;
50
50
  })(Path || (Path = {}));
51
51
  function getAt(source, path) {
52
52
  if (path === "") {
@@ -90,12 +90,12 @@ var Tuple;
90
90
 
91
91
  // src/path.mts
92
92
  var Path;
93
- ((Path3) => {
94
- Path3.stringSplitRegex = /\?\.|\.|\[|\]/g;
93
+ ((Path2) => {
94
+ Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
95
95
  function stringSplit(path) {
96
- return path.split(Path3.stringSplitRegex);
96
+ return path.split(Path2.stringSplitRegex);
97
97
  }
98
- Path3.stringSplit = stringSplit;
98
+ Path2.stringSplit = stringSplit;
99
99
  })(Path || (Path = {}));
100
100
  function getAt(source, path) {
101
101
  if (path === "") {
@@ -27,12 +27,12 @@ module.exports = __toCommonJS(internal_exports);
27
27
 
28
28
  // src/path.mts
29
29
  var Path;
30
- ((Path3) => {
31
- Path3.stringSplitRegex = /\?\.|\.|\[|\]/g;
30
+ ((Path2) => {
31
+ Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
32
32
  function stringSplit(path) {
33
- return path.split(Path3.stringSplitRegex);
33
+ return path.split(Path2.stringSplitRegex);
34
34
  }
35
- Path3.stringSplit = stringSplit;
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: () => Path2,
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 Path2;
530
- ((Path3) => {
531
- Path3.stringSplitRegex = /\?\.|\.|\[|\]/g;
529
+ var Path;
530
+ ((Path2) => {
531
+ Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
532
532
  function stringSplit(path) {
533
- return path.split(Path3.stringSplitRegex);
533
+ return path.split(Path2.stringSplitRegex);
534
534
  }
535
- Path3.stringSplit = stringSplit;
536
- })(Path2 || (Path2 = {}));
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 = Path2.stringSplit(path);
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 = Path2.stringSplit(path);
558
+ const items = Path.stringSplit(path);
559
559
  function createPatchPart(index, target) {
560
560
  if (index === items.length) {
561
561
  return patchItem;
@@ -26,12 +26,12 @@ module.exports = __toCommonJS(selector_exports);
26
26
 
27
27
  // src/path.mts
28
28
  var Path;
29
- ((Path3) => {
30
- Path3.stringSplitRegex = /\?\.|\.|\[|\]/g;
29
+ ((Path2) => {
30
+ Path2.stringSplitRegex = /\?\.|\.|\[|\]/g;
31
31
  function stringSplit(path) {
32
- return path.split(Path3.stringSplitRegex);
32
+ return path.split(Path2.stringSplitRegex);
33
33
  }
34
- Path3.stringSplit = stringSplit;
34
+ Path2.stringSplit = stringSplit;
35
35
  })(Path || (Path = {}));
36
36
  function getAt(source, path) {
37
37
  if (path === "") {
@@ -1,4 +1,4 @@
1
- import { Deep, Path } from './internal.mjs';
1
+ import { Deep } from './internal.mjs';
2
2
  /**
3
3
  * Returns the result of applying the given `selector` shape to the given `source` value.
4
4
  * @typeparam T - the patch value type
@@ -1 +1 @@
1
- {"version":3,"file":"selector.mjs","sourceRoot":"","sources":["../../src/selector.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,gBAAgB,CAAC;AAkD5D;;;;;;;;;;;;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"}
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"}
@@ -1,5 +1,5 @@
1
1
  import type { IsAnyFunc, IsArray } from '@rimbu/base';
2
- import { Path, type Protected } from './internal.mjs';
2
+ import { type Path, type Protected } from './internal.mjs';
3
3
  /**
4
4
  * Type defining the allowed selectors on an object of type `T`.
5
5
  * Selectors can be:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimbu/deep",
3
- "version": "1.0.0",
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.0.0",
76
- "@rimbu/common": "^1.0.0",
77
- "tslib": "^2.5.3"
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": "c9d33ecc231d7b33b7e29734295fdb35caa235a6"
82
+ "gitHead": "f0a61c7e2ba7ecc76dd56a57a9fe7e6ae059eb59"
83
83
  }
package/src/selector.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { IsAnyFunc, IsArray } from '@rimbu/base';
2
- import { Deep, Path, type Protected } from './internal.mjs';
2
+
3
+ import { Deep, type Path, type Protected } from './internal.mjs';
3
4
 
4
5
  /**
5
6
  * Type defining the allowed selectors on an object of type `T`.