securityos/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs

15 lines
339 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
function shallowCompare(next, prev) {
if (!Array.isArray(prev))
return false;
const prevLength = prev.length;
if (prevLength !== next.length)
return false;
for (let i = 0; i < prevLength; i++) {
if (prev[i] !== next[i])
return false;
}
return true;
}
export { shallowCompare };