lesca-url-parameters
v2.0.8
Published
get query string parameters value
Downloads
9
Maintainers
Readme
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