Skip to content

calypsow777/url-extensions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL extensions

CircleCI

Extensions to the nodejs url package.

Installation

npm install --save @ambassify/url-extensions

Usage

const URL = require('@ambassify/url-extensions');

// https://www.google.com?hello=world
URL.query.add('https://www.google.com', { hello: 'world' });

// https://www.google.com?hello=world
URL.query.omit('https://www.google.com?a=test&hello=world', ['a']);
URL.query.remove('https://www.google.com?a=test&hello=world', ['a']);

// hello=world&foo=bar
URL.query.build({ hello: 'world', foo: 'bar' });
URL.query.rebuild({ hello: 'world', foo: 'bar' });

// { hello: 'world' }
URL.query.parse('https://www.google.com/?hello=world');

// https://www.google.com/foo/bar
URL.path.concat('https://www.google.com', 'foo', 'bar');

Contributing

If you have some issue or code you would like to add, feel free to open a Pull Request or Issue and we will look into it as soon as we can.

License

We are releasing this under a MIT License.

About us

If you would like to know more about us, be sure to have a look at our website, or our Twitter accounts @Ambassify, Sitebase, JorgenEvens

About

Extensions to the nodejs url package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%