mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-04 22:09:31 +08:00
16 lines
453 B
Text
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 };
|