I think will be great if we add function to automatically remove ? at the start of the string since windows.location.search will return us ? at the start of string
consider this URL as example:
const url = 'https://google.com/?query=foo';
const query = window.location.search // we got ?query=foo
var queryString = require('querystrings');
const output = queryString.parse(query);
// output will be
const output = {
'?query': 'foo' // we got unintended `?`
}