inibase 1.0.0-rc.74 → 1.0.0-rc.75
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/file.js +4 -1
- package/dist/utils.js +4 -2
- package/package.json +1 -1
package/dist/file.js
CHANGED
|
@@ -76,8 +76,11 @@ export const isExists = async (path) => {
|
|
|
76
76
|
const secureString = (input) => {
|
|
77
77
|
if (["true", "false"].includes(String(input)))
|
|
78
78
|
return input ? 1 : 0;
|
|
79
|
-
if (typeof input !== "string")
|
|
79
|
+
if (typeof input !== "string") {
|
|
80
|
+
if (input === null || input === undefined)
|
|
81
|
+
return "";
|
|
80
82
|
return input;
|
|
83
|
+
}
|
|
81
84
|
let decodedInput = null;
|
|
82
85
|
try {
|
|
83
86
|
decodedInput = decodeURIComponent(input);
|
package/dist/utils.js
CHANGED
|
@@ -417,10 +417,12 @@ export function FormatObjectCriteriaValue(value) {
|
|
|
417
417
|
* @param {Schema} schema
|
|
418
418
|
*/
|
|
419
419
|
export function getField(keyPath, schema) {
|
|
420
|
-
let RETURN =
|
|
420
|
+
let RETURN = schema;
|
|
421
421
|
const keyPathSplited = keyPath.split(".");
|
|
422
422
|
for (const [index, key] of keyPathSplited.entries()) {
|
|
423
|
-
|
|
423
|
+
if (!isArrayOfObjects(RETURN))
|
|
424
|
+
return null;
|
|
425
|
+
const foundItem = RETURN.find((item) => item.key === key);
|
|
424
426
|
if (!foundItem)
|
|
425
427
|
return null;
|
|
426
428
|
if (index === keyPathSplited.length - 1)
|