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

obscure-email

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obscure-email

Obfuscates emails in the call of a function.

  • 1.0.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Introduction

This is a module that will obfuscate emails. There are four variations as of now, listed below.

Any style not listed below, and that is passed in, will be null

Install

npm install --save obscure-email

Examples

var obf_email = require('obscure-email');

obf_email('someone@something.com');

obf_email('someone@something.com', 'default');

Styles

stylesdescriptionexample output
defaultShows the first 3 letters and stars the rest of the letters till the @ signemail@foo.com : ema**@foo.com
end3Stars the letters until the last 3 before the @ signemail@foo.com : **ail@foo.com
first3rsDisplays the first 3 letters with a random number of stars after, between 3 and 13email@foo.com : ema***@foo.com -- ema*************@foo.com
end3rsDisplays a random number of stars first, between 3 and 13, and then the last 3 characters before the @ signemail@foo.com : *ail@foo.com -- *************ail@foo.com

Edge Case Examples

stylesedge examples output
defaulte@foo.com : *@foo.com -- em@foo.com : e*@foo.com -- ema@foo.com : em*@foo.com
end3e@foo.com : *@foo.com -- em@foo.com : *m@foo.com -- ema@foo.com : *ma@foo.com
first3rse@foo.com : ***@foo.com -- em@foo.com : e***@foo.com -- ema@foo.com : em***@foo.com
end3rse@foo.com : ***@foo.com -- em@foo.com : ***m@foo.com -- ema@foo.com : ***ma@foo.com

NOTE: As above, you can go to 13 stars, 3 was chosen here for simplicity.

FAQs

Package last updated on 17 Aug 2017

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