npm.io
0.0.1 • Published 10 years ago

url-parse-fix-auth

Licence
MIT
Version
0.0.1
Deps
0
Vulns
0
Weekly
0
Stars
2

url-parse-fix-auth NPM version

Fix url.parse to work with percent (%) characters in auth strings

url.parse fails when parsing a url with a password containing a percent character

var url = require('url');
url.parse('http://host.com/'); // works
url.parse('http://user:pass@host.com/'); // works
url.parse('http://user:pass%word@host.com/'); // Exception

Install

Install with npm

$ npm i url-parse-fix-auth --save

Usage

var parseUrl = require('url-parse-fix-auth');

parseUrl('http://username:pass%word@host.com/'); // works!

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Andreas Pizsa

License

Copyright 2016 Andreas Pizsa Released under the MIT license.


This file was generated by verb-cli on June 06, 2016.

Keywords