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

emend

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

emend

A lightweight JS-based library to inline redact e-mail addresses to protect against against scraping.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Emend

CodeFactor

A simple library that will allow you to replace an e-mail address with an encoded version of the address.

Install

npm install emend

Usage

include the library in your project:

<head>
  <script src="emend.js"></script>
</head>

and initialize it in your code (just before the end body tag):

<script>
  emend.init('YOUR SALT VALUE');
</script>

Option Defaults

/**
 * @param {String}  explicitPrefix - The prefix to use for explicit emendations.
 * @param {String}  salt - The salt to use for emendations.
 * @param {Boolean} explicitOnly - Whether to only emend explicit elements.
 * @param {Number}  domRemoveDelay - The delay in milliseconds to remove the emendation from the DOM.
 * @param {Number}  sendClickDelay - The delay in milliseconds to send a click event to the emendation.
 */
{
  explicitPrefix: '@',
  salt: '',
  explicitOnly: false,
  domRemoveDelay: 1200,
  sendClickDelay: 500
};

Contribute

If you think this could be better, please open an issue!

Please note that all interactions in this organization fall under our Code of Conduct.

License

MIT © 1996+ Ris Adams

Keywords

FAQs

Package last updated on 28 Nov 2021

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