2.0.8 • Published 2 years ago
lesca-url-parameters v2.0.8
Why use it?
use to pass values by url
Live Demo
Installation
npm install lesca-url-parameters --saveUsage
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'); // 1981Development
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