8000 GitHub - zhaoda/urlparam
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

zhaoda/urlparam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urlparam

experimental

A utility to gleam values easily from url parameters. Includes console.log reminders of possible params.

Usage

Construct URLs with parameters like this: localhost:9966/?testString=hi&testNum=9001&testBool=false

	var urlparam = require('urlparam');
	var param = urlparam('testNum', 10);
	// if testNum wasn't in the URL, 10 will be the used instead.

You can also quickly disable URLParams

	var urlparam = require('urlparam');
	urlparam.active = false;
	// For subsequent urlparam calls, testNum will be 10 despite what is in the URL
	var param = urlparam('testNum', 10);

NPM

License

MIT, see LICENSE.md for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0