js-handy-url

1.0.9 • Public • Published

js-url

Provides basic url handling and allows to simply work with urls without juggling all the time with regular expressions. If the class is initialised without an url parameter, it will take the current URL.

installation

bower install -S js-handy-url
npm install js-handy-url

usage

You can simply use it like this:

define(['js-url'], function(URL){
 
  var url = new URL(); // the current url 
  
  
  // do something without regex hassle
  url.addParameter('new', 'paramvalue');
  
  url.removeParamter('old');
  
  ....
  
  
  // use it in the end as a plain string:
  var urlstring = url.toString();
  
}

Development

tests

npm test

Readme

Keywords

none

Package Sidebar

Install

npm i js-handy-url

Weekly Downloads

0

Version

1.0.9

License

MIT

Unpacked Size

18 kB

Total Files

8

Last publish

Collaborators

  • andreas-schoenefeldt