This commit is contained in:
lik
2026-05-28 17:06:18 +08:00
parent a93a75b3c6
commit db0f47d994
582 changed files with 8060 additions and 1781 deletions

View File

@@ -28,9 +28,9 @@ function isBoolean(value) {
return typeof value === 'boolean';
}
var isNoEmptyObj = function (obj) {
function isNoEmptyObj(obj) {
return isObject(obj) && JSON.stringify(obj) !== '{}';
};
}
function includes(arr, value) {
if (!arr || !isArray(arr)) return false;
@@ -110,7 +110,7 @@ function _style(styles) {
return item != null && item !== '';
})
.map(function (item) {
return isArray(item) ? _style(item) : endsWith(item, ';');
return isString(item) ? endsWith(item, ';') : _style(item);
})
.join(' ');
}
@@ -131,7 +131,7 @@ function _style(styles) {
function isValidIconName(str) {
// prettier-ignore
return getRegExp('^[A-Za-z0-9\-]+$').test(str);
return getRegExp('^[A-Za-z0-9\-\_]+$').test(str);
}
module.exports = {