From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期三, 28 五月 2025 16:48:52 +0800 Subject: [PATCH] 初始化项目 --- uni_modules/wu-ui-tools/libs/function/color/is-arrayish/index.js | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/uni_modules/wu-ui-tools/libs/function/color/is-arrayish/index.js b/uni_modules/wu-ui-tools/libs/function/color/is-arrayish/index.js new file mode 100644 index 0000000..18d3bbe --- /dev/null +++ b/uni_modules/wu-ui-tools/libs/function/color/is-arrayish/index.js @@ -0,0 +1,9 @@ +export default function isArrayish(obj) { + if (!obj || typeof obj === 'string') { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && (obj.splice instanceof Function || + (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); +}; -- Gitblit v1.9.3