MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / urlencode

Function urlencode

openlibrary/plugins/openlibrary/js/python.js:22–29  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

20
21// Implementation of Python urllib.urlencode in Javascript.
22export function urlencode(query) {
23 var parts = [];
24 var k;
25 for (k in query) {
26 parts.push(`${k}=${query[k]}`);
27 }
28 return parts.join('&');
29}
30
31export function slice(array, begin, end) {
32 var a = [];

Callers 5

python.test.jsFile · 0.90
build_urlFunction · 0.50
remove_high_priorityFunction · 0.50
_trigger_rebuildFunction · 0.50

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected