@mapomodule/utils 1.0.0-alpha.13 → 1.0.0-alpha.15
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 +11 -0
- package/helpers/objHelpers.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.0.0-alpha.15](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* enhance findPropPaths to deal also with arrays indexes ([158a9aa](https://github.com/lotrekagency/mapo/commit/158a9aa9329defbecbb39e1f19df2855dd3ece01))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.0.0-alpha.13](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-01)
|
|
7
18
|
|
|
8
19
|
|
package/helpers/objHelpers.js
CHANGED
|
@@ -63,14 +63,14 @@ function findPropPaths(obj, predicate) {
|
|
|
63
63
|
throw new TypeError("Predicate is not a function");
|
|
64
64
|
}
|
|
65
65
|
(function find(obj) {
|
|
66
|
-
for (const key
|
|
66
|
+
for (const key in obj) {
|
|
67
67
|
if (predicate({ val: obj[key], obj, path, key }) === true) {
|
|
68
68
|
path.push(key);
|
|
69
69
|
results.push(path.join("."));
|
|
70
70
|
path.pop();
|
|
71
71
|
}
|
|
72
72
|
const o = obj[key];
|
|
73
|
-
if (o && typeof o === "object"
|
|
73
|
+
if (o && typeof o === "object") {
|
|
74
74
|
if (!discoveredObjects.find(obj => obj === o)) {
|
|
75
75
|
path.push(key);
|
|
76
76
|
discoveredObjects.push(o);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/utils",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "This is part of Mapo nuxt module. Provides a set of utils for the project.",
|
|
6
6
|
"author": "bnznamco <gabriele.baldi.01@gmail.com>",
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "cd42b3dd094ef3bf743c67819e6059bf9ccac491"
|
|
16
16
|
}
|