chore: initial import

This commit is contained in:
liangjian
2026-06-29 09:42:53 +08:00
commit 9fea127de1
241 changed files with 82767 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
/**
* 打乱传入的数组
*
* @param {Array} array 待打乱的数组
*/
function random(array = []) {
return array.sort(() => Math.random() - 0.5)
}
/**
* 判断是否为数组
*
* @param {Object} arr
*/
function isArray(arr) {
return Object.prototype.toString.call(arr) === '[object Array]'
}
export default {
random,
isArray
}