UNPKG

@0xobedient/dexscreener-sdk

Version:
17 lines 626 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.joinValuesWithSlash = joinValuesWithSlash; exports.toQueryString = toQueryString; function joinValuesWithSlash(obj) { return Object.values(obj) .map((value) => `/${value}`) .join(""); } function toQueryString(params) { const query = Object.entries(params) .filter(([_, value]) => value !== undefined && value !== null) .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`) .join("&"); return query ? `?${query}` : ""; } //# sourceMappingURL=query.js.map