Skip to content

schtauffen/query-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Query-Handler.js

Query-Handler.js uses UMD. CommonJS, AMD, w/e.

Example usage:

let QueryHandler = require('query-handler');
let q = QueryHandler("?a=1&b");

q.has("a"); // -> true
q.has("b"); // -> true
q.has("c"); // -> false

q.get("a"); // -> 1
q.get("c", "not found!"); // -> "not found!"

q.string; // -> "?a=1&b"

q.remove("b"); 
q.string; // -> "?a=1"

q.set("c", true);
q.string; // -> "?a=1&c=true"

About

Helper for handling query parameters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published