defang-refang

Defanging dangerous stuff

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
defang-refang
1110.0.54 years ago4 years agoMinified + gzip package size for defang-refang in KB

Readme

Defang! Refang!
Defang and fang your dangerous URLs, IPs and emails! No dependencies, you only get the dentist.
npm version

Install

$ npm install defang-refang

Usage

import dr from "./defangrefang";

dr.defang("http://dr.evils.lair/");

=> "hXXp://dr[.]evils[.]lair/"

dr.refang("'192[.]168[.]1[.]0'");

=> "192.168.1.0"

Features

Handles the following:
  • Emails
  • IPv4
  • URLs
  • Prefixes
* ftp
* http
* https
* ssh