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>
26 lines
761 B
Text
26 lines
761 B
Text
'use strict';
|
|
|
|
var utilUriEscape = require('@smithy/util-uri-escape');
|
|
|
|
function buildQueryString(query) {
|
|
const parts = [];
|
|
for (let key of Object.keys(query).sort()) {
|
|
const value = query[key];
|
|
key = utilUriEscape.escapeUri(key);
|
|
if (Array.isArray(value)) {
|
|
for (let i = 0, iLen = value.length; i < iLen; i++) {
|
|
parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`);
|
|
}
|
|
}
|
|
else {
|
|
let qsEntry = key;
|
|
if (value || typeof value === "string") {
|
|
qsEntry += `=${utilUriEscape.escapeUri(value)}`;
|
|
}
|
|
parts.push(qsEntry);
|
|
}
|
|
}
|
|
return parts.join("&");
|
|
}
|
|
|
|
exports.buildQueryString = buildQueryString;
|