@bbn/bbn 1.0.409 → 1.0.410
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/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/fn/string/treatForHash.js +8 -3
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import isDom from '../type/isDom.js';
|
|
2
|
+
import getPath from '../html/getPath.js';
|
|
3
|
+
import isCp from '../type/isCp.js';
|
|
2
4
|
/**
|
|
3
5
|
* Makes a string out of anything
|
|
4
6
|
* @param {*} value
|
|
@@ -42,16 +44,19 @@ export default function treatForHash(value, depth, level, visited, fn) {
|
|
|
42
44
|
}
|
|
43
45
|
else if (![undefined, Object, Array, null].includes(value === null || value === void 0 ? void 0 : value.constructor)) {
|
|
44
46
|
if (isDom(value)) {
|
|
45
|
-
if (value
|
|
47
|
+
if (isCp(value)) {
|
|
48
|
+
value = "__BBN_CP__" + value.$cid;
|
|
49
|
+
}
|
|
50
|
+
else if (value.bbnId) {
|
|
46
51
|
value =
|
|
47
52
|
"__BBN_DOM__" + value.tagName + "/" + value.bbnId + value.bbnHash;
|
|
48
53
|
}
|
|
49
54
|
else {
|
|
50
|
-
value = "__BBN_DOM__" + value
|
|
55
|
+
value = "__BBN_DOM__" + getPath(value);
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
else {
|
|
54
|
-
value = "
|
|
59
|
+
value = "__BBN_UNKNOWN_OBJECT__" + value.constructor.toString();
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
else if (bbn.fn.isArray(value)) {
|