securityos/node_modules/stylelint/lib/utils/arrayEqual.js

17 lines
330 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
/**
* Tests if two arrays are equal.
*
* @param {unknown} a
* @param {unknown} b
* @returns {boolean}
*/
module.exports = function arrayEqual(a, b) {
if (!Array.isArray(a) || !Array.isArray(b)) return false;
if (a.length !== b.length) return false;
return a.every((elem, index) => elem === b[index]);
};