Rocky_Mountain_Vending/.pnpm-store/v10/files/49/e8bc9734ddb05ebc4775b91521cef8bc75a53c3ad9b116b13b4d7ce5d1e7c573f5d5c5723b23e6063330ba81866fa421d56d5d0da506ec0832b9a74e220fd4
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

36 lines
1.1 KiB
Text

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/**
* Shallow merge two objects.
* Does not mutate the passed in objects.
* Undefined/empty values in the merge object will overwrite existing values.
*
* By default, this merges 2 levels deep.
*/
function merge(initialObj, mergeObj, levels = 2) {
// If the merge value is not an object, or we have no merge levels left,
// we just set the value to the merge value
if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {
return mergeObj;
}
// If the merge object is an empty object, and the initial object is not undefined, we return the initial object
if (initialObj && Object.keys(mergeObj).length === 0) {
return initialObj;
}
// Clone object
const output = { ...initialObj };
// Merge values into output, resursively
for (const key in mergeObj) {
if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {
output[key] = merge(output[key], mergeObj[key], levels - 1);
}
}
return output;
}
exports.merge = merge;
//# sourceMappingURL=merge.js.map