Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redact-url

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redact-url

Redact or remove authentication data from URLs

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
increased by45%
Maintainers
1
Weekly downloads
 
Created
Source

redact-url Build Status

Redact or remove authentication data from URLs

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install redact-url --save

Usage

var redact = require('redact-url');

// u:p style
redact('https://suzy:secrets@example.com');
// https://REDACTED@example.com

// sketchy query params
redact('https://example.com/password=1');
// https://example.com/password=REDACTED

// optional replacment string
redact('https://example.com/password=1', 'XXX');
// https://example.com/password=XXX

// clean URLs are untouched
redact('https://no-auth-stuff-here.com');
// https://no-auth-stuff-here.com

// non-URLs are untouched
redact("this is not a url");
// this is not a url

Tests

npm install
npm test

License

MIT

Zeke Sikelianos <zeke@sikelianos.com> (http://zeke.sikelianos.com/)

Keywords

FAQs

Package last updated on 06 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc