Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/risadams/emend
- Owner: risadams
- License: mit
- Created: 2021-10-22T15:28:40.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-23T10:49:10.000Z (3 months ago)
- Last Synced: 2024-09-23T19:37:08.824Z (about 1 month ago)
- Topics: anti-spam, email, js
- Language: JavaScript
- Homepage:
- Size: 775 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
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