safe-url

1.0.1 • Public • Published

safe-url

have you ever wanted to print out a url, but were worried about logging basic auth credentials? this module will do its best to scrub them out.

note, this comes at ABSOLUTELY NO GUARANTEE on my part, and if you are truly concerned about security, either fork and manually review or find a different dependency.

example

> var safeUrl = require('./');
undefined
> var url = 'https://iamauser:supersekritpassword@this.is.my.couch.trashfire.xyz'
undefined
> safeUrl(url)
'https://iamauser:******@this.is.my.couch.trashfire.xyz'
> 

credits

this implementation was extracted from @mikeal's couchapp module many years ago.

license

this project would be covered under the same license as the couchapp project. unfortunately, it's what you might call "poorly licensed." using it in MIT projects is probably safe, but if it's important to you then you'll have to ask Mikeal.

Package Sidebar

Install

npm i safe-url

Weekly Downloads

5

Version

1.0.1

License

same as https://github.com/mikeal/node.couchapp.js

Unpacked Size

1.81 kB

Total Files

3

Last publish

Collaborators

  • jfhbrook