MCPcopy Create free account
hub / github.com/6dylan6/jdpro / getQueryString

Method getQueryString

function/magic.js:488–495  ·  view source on GitHub ↗
(url, name)

Source from the content-addressed store, hash-verified

486 }
487
488 getQueryString(url, name) {
489 let reg = new RegExp("(^|[&?])" + name + "=([^&]*)(&|$)");
490 let r = url.match(reg);
491 if (r != null) {
492 return unescape(r[2]);
493 }
494 return '';
495 }
496
497 unique(arr) {
498 return Array.from(new Set(arr))

Callers 1

buildMethod · 0.95

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected