MCPcopy Index your code
hub / github.com/ccxt/node-binance-api / makeQueryString

Function makeQueryString

deprecated/node-binance-api.js:254–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252 // XXX: This one works with array (e.g. for dust.transfer)
253 // XXX: I _guess_ we could use replace this function with the `qs` module
254 const makeQueryString = q =>
255 Object.keys(q)
256 .reduce((a, k) => {
257 if (Array.isArray(q[k])) {
258 q[k].forEach(v => {
259 a.push(k + "=" + encodeURIComponent(v))
260 })
261 } else if (q[k] !== undefined) {
262 a.push(k + "=" + encodeURIComponent(q[k]));
263 }
264 return a;
265 }, [])
266 .join("&");
267
268 /**
269 * Create a http request to the public API

Callers 3

marketRequestFunction · 0.85
signedRequestFunction · 0.85
promiseRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected