UNPKG

acud

Version:

acg react 组件库

36 lines • 793 B
export function isEqualArrays(arrA, arrB) { if (arrA === arrB) { return true; } if (!arrA || !arrB) { return false; } var len = arrA.length; if (arrB.length !== len) { return false; } // eslint-disable-next-line no-plusplus for (var i = 0; i < len; i++) { if (arrA[i] !== arrB[i]) { return false; } } return true; } export function isIncludeArray(arrA, arrB) { return arrA.some(function (arrAItem) { return isEqualArrays(arrAItem, arrB); }); } export function getElementStyle(element) { if (!element) { return; } if (window.getComputedStyle) { return getComputedStyle(element, null); } return element.currentStyle; } export function isPureType(value) { return typeof value === 'string' || typeof value === 'number'; }