Created
November 15, 2013 18:57
Revisions
-
sindresorhus created this gist
Nov 15, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ // Get the queryString module from: // https://github.com/sindresorhus/query-string console.log(location.href); // http://sindresorhus.com/?foo=bar console.log(location.search); // ?foo=bar var parsed = queryString.parse(location.search); console.log(parsed); // {foo: 'bar'} parsed.foo = 'unicorn'; parsed.ilike = 'pizza'; location.search = queryString.stringify(parsed); console.log(location.search); // ?foo=unicorn&ilike=pizza This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Get the queryString module from: https://github.com/sindresorhus/query-string