@peter.naydenov/walk-async 3.0.4 → 3.0.5

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/Changelog.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Release History
2
2
 
3
3
 
4
+
5
+ ### 3.0.5 (2026-05-05)
6
+ - [x] Dependencies updates. Ask-for-promise to version 3.1.1;
7
+
8
+
9
+
4
10
  ### 3.0.4 (2025-10-28)
5
11
  - [x] Dependencies updates. Ask-for-promise to version 3.1.0;
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peter.naydenov/walk-async",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Deep copy with fine control during the process. Can be used also as a deep forEach function",
5
5
  "main": ".dist/walk-async.umd.js",
6
6
  "type": "module",
@@ -28,17 +28,21 @@
28
28
  "author": "Peter Naydenov",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "ask-for-promise": "3.1.0"
31
+ "ask-for-promise": "^3.1.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@rollup/plugin-commonjs": "^28.0.9",
34
+ "@rollup/plugin-commonjs": "^29.0.2",
35
35
  "@rollup/plugin-node-resolve": "^16.0.3",
36
- "@rollup/plugin-terser": "^0.4.4",
37
- "c8": "^10.1.3",
38
- "chai": "^6.2.0",
39
- "mocha": "^11.7.4",
40
- "rollup": "^4.52.5",
41
- "typescript": "^5.9.3"
36
+ "@rollup/plugin-terser": "^1.0.0",
37
+ "c8": "^11.0.0",
38
+ "chai": "^6.2.2",
39
+ "mocha": "^11.7.5",
40
+ "rollup": "^4.60.3",
41
+ "typescript": "^6.0.3"
42
+ },
43
+ "overrides": {
44
+ "diff": "^8.0.2",
45
+ "serialize-javascript": "^7.0.0"
42
46
  },
43
47
  "c8": {
44
48
  "include": [
package/tsconfig.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "allowJs": true,
5
5
  "declaration": true,
6
6
  "emitDeclarationOnly": true,
7
+ "rootDir": "./src",
7
8
  "outDir": "types",
8
9
  "declarationMap": true
9
10
  }
package/types/main.d.ts CHANGED
@@ -3,7 +3,7 @@ export type Options = {
3
3
  /**
4
4
  * - The data structure to be copied.
5
5
  */
6
- data: any;
6
+ data: Object;
7
7
  /**
8
8
  * - A function called for every object in the data structure.
9
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":";;;;;;;;;oBAqBc,WAAS,IAAI;;;;iBACb,WAAS,IAAI;;AAJ3B;;;;;GAKG;AAKH;;;;;;;;;;;GAWG;AACH,qEARW,OAAO,WAIJ,GAAG,EAAA,gBAmChB"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":";;;;;UAoBc,MAAM;;;;oBACN,WAAS,IAAI;;;;iBACb,WAAS,IAAI;;AAJ3B;;;;;GAKG;AAKH;;;;;;;;;;;GAWG;AACH,qEARW,OAAO,WAIJ,GAAG,EAAA,gBAmChB"}
@@ -0,0 +1,35 @@
1
+ export default walk;
2
+ export type Options = {
3
+ /**
4
+ * - The data structure to be copied.
5
+ */
6
+ data: Object;
7
+ /**
8
+ * - A function called for every object in the data structure.
9
+ */
10
+ objectCallback: Function | null;
11
+ /**
12
+ * - A function called for every property in the data structure.
13
+ */
14
+ keyCallback: Function | null;
15
+ };
16
+ /**
17
+ * @typedef {Object} Options
18
+ * @property {Object} data - The data structure to be copied.
19
+ * @property {Function|null} objectCallback - A function called for every object in the data structure.
20
+ * @property {Function|null} keyCallback - A function called for every property in the data structure.
21
+ */
22
+ /**
23
+ * Walk-async is a deep copy function that executes callback functions on every object and property.
24
+ * Callbacks are async functions.
25
+ *
26
+ * @param {Options} options - Object with following properties:
27
+ * - data - The data structure to be copied.
28
+ * - objectCallback - A function that will be called for every object in the data structure.
29
+ * - keyCallback - A function that will be called for every property in the data structure.
30
+ * @param {...any} args - Any additional arguments will be passed to the callback functions.
31
+ *
32
+ * @returns {Promise} - A promise that resolves to the immutable copy of the data structure.
33
+ */
34
+ declare function walk({ data: origin, objectCallback, keyCallback }: Options, ...args: any[]): Promise<any>;
35
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.js"],"names":[],"mappings":";;;;;UAoBc,MAAM;;;;oBACN,WAAS,IAAI;;;;iBACb,WAAS,IAAI;;AAJ3B;;;;;GAKG;AAKH;;;;;;;;;;;GAWG;AACH,qEARW,OAAO,WAIJ,GAAG,EAAA,gBAmChB"}