wwp-js-url-helper
v1.0.9
Published
```sh npm install wwp-js-url-helper --save ``` ### inport ```sh import jsurl from 'wwp-js-url-helper' ``` ### functions ```sh var url = 'http://localhost:8080/?id=1#/test?name=11'
Downloads
8
Readme
install
npm install wwp-js-url-helper --save
inport
import jsurl from 'wwp-js-url-helper'
functions
var url = 'http://localhost:8080/?id=1#/test?name=11'
jsurl.getSearch('id',[url]); // 1
jsurl.updateSearch('id','2',[url]); // http://localhost:8080/?id=2#/test?name=11
jsurl.removeSearch('id',[url]); // http://localhost:8080/#/test?name=11
jsurl.getHash('name',[url]); // 11
jsurl.updateHash('name','22',[url]); // http://localhost:8080/?id=1#/test?name=22
jsurl.removeSearch('name',[url]); // http://localhost:8080/?id=1#/test