snipe/web/node_modules/@iconify/utils/lib/misc/objects.js
pyr0ball 7a704441a6 feat(snipe): Vue 3 frontend scaffold + Docker web service
- web/: Vue 3 + Vite + UnoCSS + Pinia, dark tactical theme (amber/#0d1117)
- AppNav, ListingCard, SearchView with filters/sort, composables
  (useSnipeMode, useKonamiCode, useMotion), Pinia search store
- Steal shimmer, auction countdown, Snipe Mode easter egg all native in Vue
- docker/web/: nginx + multi-stage Dockerfile (node build → nginx serve)
- compose.yml: api (8510) + web (8509) services
- Dockerfile CMD updated to uvicorn for upcoming FastAPI layer
- Clean build: 0 TS errors, 380 modules
2026-03-25 15:11:35 -07:00

27 lines
No EOL
782 B
JavaScript

/**
* Compares two objects, returns true if identical
*
* Reference object contains keys
*/
function compareObjects(obj1, obj2, ref = obj1) {
for (const key in ref) if (obj1[key] !== obj2[key]) return false;
return Object.keys(obj1).length === Object.keys(obj2).length;
}
/**
* Unmerge objects, removing items that match in both objects
*/
function unmergeObjects(obj1, obj2) {
const result = { ...obj1 };
for (const key in obj2) if (result[key] === obj2[key]) delete result[key];
return result;
}
/**
* Get common properties in 2 objects
*/
function commonObjectProps(item, reference) {
const result = Object.create(null);
for (const key in reference) if (key in item) result[key] = item[key];
return result;
}
export { commonObjectProps, compareObjects, unmergeObjects };