@tomsd/urlquery
v1.0.0
Published
utility for query parameter in the url
Downloads
2
Readme
@tomsd/urlquery
Installation
npm install @tomsd/urlquery
Usage
// with bundler
import query from "@tomsd/urlquery";
// http://localhost/whatever.html?abc=def&ghi=jkl as url for example
const myQuery = query.activate();
myQuery.names.forEach((name) => {
console.log(name);
}); // abc, ghi
console.log(myQuery.get("abc")); // "def"
console.log(myQuery.get("ghi")); // "jkl"
console.log(myQuery.get("xyz")); // ""