🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@already-existed/email-obfuscator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@already-existed/email-obfuscator

Lib for obfuscate email on server and unobfuscate on client.

1.1.2
latest
Source
npm
Version published
Weekly downloads
8
-55.56%
Maintainers
1
Weekly downloads
 
Created
Source

EmailObfuscator

Lib for obfuscate email on server and unobfuscate on client.

Installation

npm i -S @already-existed/email-obfuscator

Usage

<!-- html -->
<a data-email="true" href="mailto:[email-href]some-email@some.com[/email-href]">
  [email]some-email@some.com[/email]
</a>
// server
import { obfuscateEmail } from '@already-existed/email-obfuscator'

...
res.send(obfuscateEmail(html))
...
// client
import { unobfuscateEmail } from '@already-existed/email-obfuscator'

window.addEventListener('load', () => {
  unobfuscateEmail()
})

Options


// 'binary' - slow
// 'base64' - fast
type ObfuscateType = 'binary' | 'base64'

interface ObfuscateOptions {
  type?: ObfuscateType // default: 'binary'
}

obfuscateEmail(value: string, opts?: ObfuscateOptions): string
unobfuscateEmail(opts?: ObfuscateOptions): void

Keywords

email obfuscator

FAQs

Package last updated on 16 May 2020

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