Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/risadams/emend

A lightweight JS-based library to inline redact e-mail addresses to protect against against scraping.
https://github.com/risadams/emend

anti-spam email js

Last synced: 25 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# Emend

[![CodeFactor](https://www.codefactor.io/repository/github/risadams/emend/badge)](https://www.codefactor.io/repository/github/risadams/emend)

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

## Install

```sh
npm install emend
```

## Usage

include the library in your project:

```html

```

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

```html

emend.init('YOUR SALT VALUE');

```

### Option Defaults

```js
/**
* @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](https://github.com/risadams/Emend/issues/new)!

Please note that all interactions in this organization fall under our [Code of Conduct](CODE_OF_CONDUCT.md).

## License

[MIT](LICENSE) © 1996+ Ris Adams