posthtml-obfuscate
v0.1.5
Published
PostHTML plugin that'll obfuscate emails etc...
Readme
PostHTML Obfuscate
Obfuscates emails to make it harder for bots to recognize.
Install
npm i posthtml-obfuscate -DOutput
<!-- Before -->
<a href="mailto:[email protected]">
[email protected]
</a>
<!-- After -->
<a href="mailto:sam@smith.com">
sam@smith.com
</a>Usage
const posthtml = require('posthtml');
const phObfuscate= require('posthtml-obfuscate');
const options = {
includeMailto: false
};
posthtml([phObfuscate(options)])
.process(myHtml)
.then(result => {
console.log(result.html); // The output
});Options
includeMailto: Boolean - Includes themailto:prefix in the obfuscation. (Default: false)
