inibase 1.0.0-rc.43 → 1.0.0-rc.44
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.js +14 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -417,16 +417,21 @@ export default class Inibase {
|
|
|
417
417
|
if (!RETURN[index])
|
|
418
418
|
RETURN[index] = {};
|
|
419
419
|
if (Utils.isObject(item)) {
|
|
420
|
-
if (!Object.values(item)
|
|
421
|
-
if (RETURN[index][field.key])
|
|
420
|
+
if (!Utils.isArrayOfNulls(Object.values(item))) {
|
|
421
|
+
if (RETURN[index][field.key])
|
|
422
422
|
Object.entries(item).forEach(([key, value], _index) => {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
for (let _index = 0; _index < value.length; _index++)
|
|
424
|
+
if (RETURN[index][field.key][_index])
|
|
425
|
+
Object.assign(RETURN[index][field.key][_index], {
|
|
426
|
+
[key]: value[_index],
|
|
427
|
+
});
|
|
428
|
+
else
|
|
429
|
+
RETURN[index][field.key][_index] = {
|
|
430
|
+
[key]: value[_index],
|
|
431
|
+
};
|
|
427
432
|
});
|
|
428
|
-
|
|
429
|
-
|
|
433
|
+
else if (Object.values(item).every((_i) => Utils.isArrayOfArrays(_i) || Array.isArray(_i)) &&
|
|
434
|
+
prefix)
|
|
430
435
|
RETURN[index][field.key] = item;
|
|
431
436
|
else {
|
|
432
437
|
RETURN[index][field.key] = [];
|
|
@@ -434,7 +439,7 @@ export default class Inibase {
|
|
|
434
439
|
for (let _i = 0; _i < value.length; _i++) {
|
|
435
440
|
if (value[_i] === null ||
|
|
436
441
|
(Array.isArray(value[_i]) &&
|
|
437
|
-
value[_i]
|
|
442
|
+
Utils.isArrayOfNulls(value[_i])))
|
|
438
443
|
continue;
|
|
439
444
|
if (!RETURN[index][field.key][_i])
|
|
440
445
|
RETURN[index][field.key][_i] = {};
|