wwp-js-url-helper

1.0.9 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i wwp-js-url-helper

Weekly Downloads

2

Version

1.0.9

License

ISC

Unpacked Size

3.53 kB

Total Files

3

Last publish

Collaborators

  • wwping