0.1.4 • Published 9 years ago
ezqs v0.1.4
ezqs
Returns an object of query string key-value pairs based on a URL paramater
API
By Deafult you pass the ezqs function a URL to parse.
ezqs(<url>) returns an object of all of the query strings in the <url> you passed in.
Examples
var url = window.location.href;
//'https://rosel.io?cool=yes&lame=nope&hacks=duh'
var queryStringObj = ezqs(url);
console.log(queryStringObj);
// would log: { cool: "yes", hacks: "duh", lame: "nope" }console.log(ezqs('https://rosel.io?foo=bar&boop=bop'));
// would log: { foo: "bar", boop: "bop" }