1.0.5 • Published 2 years ago

emend v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago