MCPcopy
hub / github.com/js-cookie/js-cookie / getQuery

Function getQuery

test/utils.js:20–31  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

18
19 window.using = function (assert) {
20 function getQuery(key) {
21 var queries = window.location.href.split('?')[1]
22 if (!queries) {
23 return
24 }
25 var pairs = queries.split(/&|=/)
26 var indexBaseURL = pairs.indexOf(key)
27 var result = pairs[indexBaseURL + 1]
28 if (result) {
29 return decodeURIComponent(result)
30 }
31 }
32 function setCookie(name, value) {
33 return {
34 then: function (callback) {

Callers 1

setCookieFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…