Detalhes do pacote

lesca-url-parameters

jameshsu1125849MIT2.0.8

get query string parameters value

lesca, 衝康吉, jameshsu1125, query string

readme (leia-me)

NPM React React React React React NPM

Why use it?

use to pass values by url

Live Demo

Installation

npm install lesca-url-parameters --save

Usage

import QueryString from 'lesca-url-parameters';

// url = "https://www.example.com/?name=James&age=40&birthday=1981";
const name = QueryString.get('name'); // James
const age = QueryString.get('age'); // 40
const birthday = QueryString.get('birthday'); // 1981

Development

Methods

method description return
.get(key:string):string get url value by key value
.remove(key:string):string get url after remove key url
.root() get html file root url
.file() get html file file name

Features

  • maintain if necessary