MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / encodeQueryString

Function encodeQueryString

public/javascripts/socket.io.js:134–142  ·  view source on GitHub ↗

* Helper method to parse query objects to string. * @param {object} query * @returns {string}

(obj)

Source from the content-addressed store, hash-verified

132 * @returns {string}
133 */
134 function encodeQueryString(obj) {
135 var str = [];
136 for (var p in obj) {
137 if (obj.hasOwnProperty(p)) {
138 str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
139 }
140 }
141 return str.join('&');
142 }
143 /**
144 * Protocol version.
145 *

Callers 1

lookupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected