node-consul-service 1.0.61 → 1.0.62
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/index.cjs.js +7 -0
- package/dist/index.esm.js +7 -0
- package/dist/utils/hasValueAtPath.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19062,6 +19062,10 @@ function getValueByPath(obj, path) {
|
|
|
19062
19062
|
return path.split(".").reduce((acc, key) => acc === null || acc === void 0 ? void 0 : acc[key], obj);
|
|
19063
19063
|
}
|
|
19064
19064
|
|
|
19065
|
+
function hasValueAtPath(obj, path) {
|
|
19066
|
+
return getValueByPath(obj, path) !== undefined;
|
|
19067
|
+
}
|
|
19068
|
+
|
|
19065
19069
|
function normalizeId(id) {
|
|
19066
19070
|
if (id && typeof id === "object" && typeof id.toString === "function") {
|
|
19067
19071
|
return id.toString();
|
|
@@ -19082,6 +19086,9 @@ function setValueByPath(obj, path, value) {
|
|
|
19082
19086
|
}
|
|
19083
19087
|
|
|
19084
19088
|
function applyResolvedValues(item, field, cacheMap) {
|
|
19089
|
+
// لو القيمة مش موجودة أصلاً، ما نعملش أي حاجة
|
|
19090
|
+
if (!hasValueAtPath(item, field))
|
|
19091
|
+
return;
|
|
19085
19092
|
const value = getValueByPath(item, field);
|
|
19086
19093
|
// ✅ تجاهل الحقول غير الموجودة أو الفارغة تمامًا
|
|
19087
19094
|
if (value === undefined || value === null)
|
package/dist/index.esm.js
CHANGED
|
@@ -19060,6 +19060,10 @@ function getValueByPath(obj, path) {
|
|
|
19060
19060
|
return path.split(".").reduce((acc, key) => acc === null || acc === void 0 ? void 0 : acc[key], obj);
|
|
19061
19061
|
}
|
|
19062
19062
|
|
|
19063
|
+
function hasValueAtPath(obj, path) {
|
|
19064
|
+
return getValueByPath(obj, path) !== undefined;
|
|
19065
|
+
}
|
|
19066
|
+
|
|
19063
19067
|
function normalizeId(id) {
|
|
19064
19068
|
if (id && typeof id === "object" && typeof id.toString === "function") {
|
|
19065
19069
|
return id.toString();
|
|
@@ -19080,6 +19084,9 @@ function setValueByPath(obj, path, value) {
|
|
|
19080
19084
|
}
|
|
19081
19085
|
|
|
19082
19086
|
function applyResolvedValues(item, field, cacheMap) {
|
|
19087
|
+
// لو القيمة مش موجودة أصلاً، ما نعملش أي حاجة
|
|
19088
|
+
if (!hasValueAtPath(item, field))
|
|
19089
|
+
return;
|
|
19083
19090
|
const value = getValueByPath(item, field);
|
|
19084
19091
|
// ✅ تجاهل الحقول غير الموجودة أو الفارغة تمامًا
|
|
19085
19092
|
if (value === undefined || value === null)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasValueAtPath(obj: any, path: string): boolean;
|