Urara-Blog/node_modules/.pnpm-store/v3/files/bf/5af864419b4794a44b96bcf406d7d429603e2fed670024ace91cefda694d8c5c177451cd2cb35c938e7be22e38a52e095f38a42d645bfc165867f304c24e5b
2022-08-14 01:14:53 +08:00

16 lines
453 B
Text

import { defaults } from './index.mjs';
const allKeys = Object.keys(defaults);
const filteredKeys = allKeys.filter((key) => key !== "width" && key !== "height");
function compare(item1, item2, compareDimensions = true) {
const keys = compareDimensions ? allKeys : filteredKeys;
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
if (item1[key] !== item2[key]) {
return false;
}
}
return true;
}
export { compare };