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>
21 lines
492 B
Text
21 lines
492 B
Text
const customSymbol = /*@__PURE__*/ Symbol("customPromisify");
|
|
function _promisify(fn) {
|
|
if (fn[customSymbol]) {
|
|
return fn[customSymbol];
|
|
}
|
|
return function(...args) {
|
|
return new Promise((resolve, reject) => {
|
|
try {
|
|
fn.call(this, ...args, (err, val) => {
|
|
if (err) {
|
|
return reject(err);
|
|
}
|
|
resolve(val);
|
|
});
|
|
} catch (error) {
|
|
reject(error);
|
|
}
|
|
});
|
|
};
|
|
}
|
|
export const promisify = /*@__PURE__*/ Object.assign(_promisify, { custom: customSymbol });
|