minhnt-dev: fix bugs

This commit is contained in:
MoreStrive
2024-07-01 14:51:57 +07:00
parent 5a207435ce
commit 03ca9c6603
18 changed files with 40 additions and 121 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
const isEmpty = (value : any) => {
return (
value == null || // From standard.js: Always use === - but obj == null is allowed to check null || undefined
(typeof value === 'object' && Object.keys(value).length === 0) ||
(typeof value === 'string' && value.trim().length === 0)
value == null || // From standard.js: Always use === - but obj == null is allowed to check null || undefined
(typeof value === 'object' && Object.keys(value).length === 0) ||
(typeof value === 'string' && value.trim().length === 0)
)
}
+1 -2
View File
@@ -49,6 +49,7 @@ const regexParseString = (key: String) => {
const pattern = `${key}\\[(.*?)\\]`;
return new RegExp(pattern);
}
const regexParseStringColon = (key: String, suffix: string = ']') => {
const pattern = `${key}:\\s*([^;\\]]+)`;
return new RegExp(pattern);
@@ -232,8 +233,6 @@ const getInputValue = (inputValue: any, typeGet: 'OBJECT' | 'ARRAY') => {
}
}
export {
parseDataQueryFormString,
parseDataQueryFormObject,