Socket
Book a DemoInstallSign in
Socket

parse-url-query-params

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

parse-url-query-params

Example Button Component

latest
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

GitHub license npm version Open Source

get window / viewPort width / height

`react-window-dimensions-hook` will helps to get window / viewPort width or window / viewPort height . Install
npm i parse-url-query-params -S

Usage

Example 1

Just import the parseQueryParameters component from parse-url-query-params

  import parseQueryParameters from 'parse-url-query-params';

  const prsedUrl = parseQueryParameters('http://localhost:3000/offers?offerID=1231sfwf21&local=FR');
  console.log(prsedUrl)

OutPut ::

   {
      "offerID":"1231sfwf21",
      "local":"FR"
    }

Example 2

In destrction way... Just import the parseQueryParameters component from parse-url-query-params

  import parseQueryParameters from 'parse-url-query-params';

  const { offerID, local } = parseQueryParameters('http://localhost:3000/offers?offerID=1231sfwf21&local=FR');
                
    console.log('offerID');

    console.log(offerID);

    console.log('local');

    console.log(local);

OutPut ::

   offerID

    "1231sfwf21"

    local

    "FR"

or visit https://dvyogesh.github.io/lerna-starter/?path=/ story/design-system-parsequeryparameters--parse-query-parameters

supports Universal Testing Pattern

LICENSE

MIT

Keywords

parse query params from url

FAQs

Package last updated on 05 Sep 2023

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