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

get-query-param

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-query-param

Get a particular query param from a url

latest
Source
npmnpm
Version
2.0.3
Version published
Maintainers
1
Created
Source

get-query-param Build Status js-standard-style

Get a particular query param from a url.

Installation

npm install --save get-query-param

Usage

const getQueryParam = require('get-query-param')

getQueryParam('a', 'https://foo.bar?a=hello')  // => 'hello'
getQueryParam('a', '/full/path?a=hello')       // => 'hello'
getQueryParam('b', 'https://foo.bar?a=hello')  // => undefined
getQueryParam('b', 'https://foo.bar')          // => undefined

License

MIT

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Crafted with <3 by John Otander (@4lpine).

This package was initially generated with yeoman and the p generator.

Keywords

query

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