Rocky_Mountain_Vending/.pnpm-store/v10/files/81/fac78c2ac3c70441b3c33cc73bf875f6e86875f6bc7ead117773aa1dfb0cdbe62092e793bdbefb651b5c5a19a9edbfbffd99c3ca2d27959bb40337a46d2037
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

51 lines
1.1 KiB
Text

export const log = (...args) => {
console.log(...args);
};
export const debuglog = (section, _cb) => {
const fn = (msg, ...params) => {
if (fn.enabled) {
console.debug(`[${section}] ${msg}`, ...params);
}
};
fn.enabled = true;
return fn;
};
export const debug = debuglog;
export const inspect = (object) => JSON.stringify(object, null, 2);
export const format = (...args) => _format(...args);
export const formatWithOptions = (_options, ...args) => _format(...args);
function _format(fmt, ...args) {
const re = /(%?)(%([djos]))/g;
if (args.length > 0) {
fmt = fmt.replace(re, (match, escaped, ptn, flag) => {
let arg = args.shift();
switch (flag) {
case "o":
if (Array.isArray(arg)) {
arg = JSON.stringify(arg);
break;
}
break;
case "s":
arg = "" + arg;
break;
case "d":
arg = Number(arg);
break;
case "j":
arg = JSON.stringify(arg);
break;
}
if (!escaped) {
return arg;
}
args.unshift(arg);
return match;
});
}
if (args.length > 0) {
fmt += " " + args.join(" ");
}
fmt = fmt.replace(/%{2}/g, "%");
return "" + fmt;
}