New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

urlparam

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urlparam

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

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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.

Keywords

url

FAQs

Package last updated on 23 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts