{"_id":"safe-email","_rev":"6-75c3b7d1b56b5c45bf585bc9049ae5d1","time":{"1.0.1":"2020-05-23T13:28:59.152Z","created":"2020-05-24T14:07:44.467Z","1.1.0":"2020-05-24T14:07:44.641Z","modified":"2022-05-16T10:11:33.979Z","1.1.1":"2020-07-27T18:36:52.504Z"},"name":"safe-email","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.0":{"name":"safe-email","version":"1.1.0","description":"Easy way to obfuscate e-mails to protect them from spams through scraping bots","main":"src/safe-email.js","scripts":{"compile":"npx google-closure-compiler --js=safe-email.js --js_output_file=dist/safe-email.js --debug --formatting=PRETTY_PRINT && npx google-closure-compiler --js=safe-email.js --js_output_file=dist/safe-email.min.js","test":"echo \"No test specified\"","lint-js":"lynt --env \"browser\"","lint-md":"markdownlint **/*.md --ignore node_modules","lint-md-urls-relative":"remark . --frail --use remark-validate-links","lint-md-consistency":"remark . --frail --use remark-preset-lint-consistent"},"repository":{"type":"git","url":"git+https://github.com/undergroundwires/safe-email.git"},"author":{"name":"npm@erkinekici.com"},"license":"MIT","bugs":{"url":"https://github.com/undergroundwires/safe-email/issues"},"homepage":"https://github.com/undergroundwires/safe-email#readme","devDependencies":{"google-closure-compiler":"^20200517.0.0","lynt":"^0.5.5","markdownlint-cli":"^0.23.1","remark-cli":"^8.0.0","remark-lint-no-dead-urls":"^1.0.2","remark-preset-lint-consistent":"^3.0.0","remark-validate-links":"^10.0.0"},"dependencies":{},"_id":"safe-email@1.1.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-2BSlq2u6/3tsP3dN03WGz2MDfDpbXIZX5cNjjGPOwtqmvBET+ACtP4oIUxZq/Le/gI0uo/i6GQetUfP9SysL3Q==","shasum":"1b6735a7f3e6bce2d736c73198b64a5c7c1f1795","tarball":"https://registry.npmjs.org/safe-email/-/safe-email-1.1.0.tgz","fileCount":13,"unpackedSize":390521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyn+xCRA9TVsSAnZWagAAsl0P/itORH3RRf1H6+eA5BjS\nUoHXdsqPZVWS1OI7X+XhkaQcNoxzDw8wymi+bxcqu3gdZ+5cA7adEJH3uVa6\nPU4sipbtJzhCvVCLSiKFcVeRy0bLEH6BPU0r2bk+UfXy4huwVofVp+AFxPon\nFzLkh5SrkRK7ox5cq65yt9X8BBTWB1/PA723dHKVcWUL6FdC7UcnBGrevX3/\nM6PryExuaOrc9QGDp3rUc+CB/hOBNborWpuyMBZJaT37vneNkwSLDlNlKd/7\nBSndl70kva4qjMEIjvlgb68dZdzEoC3xf41IJBmiks3NECiqm9Xcs7cdnDdn\nIViDeVyCj6mzr94mvQzhWtffOCLWMG/msi6lpr5jJm3eBh9LTj9rOLcm0niG\neig3X8CceFs3NuHpV6tHLmmyZRhAJtNw0IEzukxc32MlSey6AoszCYSuZjFh\nfNTqJ3xVGvKfEDfa/mqmj20iu2fXFeq9RjtyK8JYEShCST2nXSBxDhQxqfcB\nGKt3OXlhFFPKHBM5mOYkCF188ZdQs1BFCp2Owge/oNpt3COxAhn9H+H/Kyql\nEwoT5DtwvgOgPpiFEEsuWAUfnk04Vx/0lq4UbVcGZ3XsloN4ymdSyv+37PWc\nbXp/yT9bfNZQX2j5+gs7oRW1B3tNxdRK61EH+9iNRofiiOcFyTxbfEYCOpZl\nz+RW\r\n=rZUN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA81WE3SLisWqkrDqz+dCoS7t9M5P8LpO5Xjb3RidPP/AiATY2Hrcp/hCOCIe509BdIplagwMQI1lVA3VbVnSvkxOQ=="}]},"maintainers":[{"name":"undergroundwires","email":"npm@erkinekici.com"}],"_npmUser":{"name":"undergroundwires","email":"npm@erkinekici.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-email_1.1.0_1590329264469_0.7179600235093553"},"_hasShrinkwrap":false},"1.1.1":{"name":"safe-email","version":"1.1.1","description":"Easy way to obfuscate e-mails to protect them from spams through scraping bots","main":"src/safe-email.js","scripts":{"compile":"npx google-closure-compiler --js=safe-email.js --js_output_file=dist/safe-email.js --debug --formatting=PRETTY_PRINT && npx google-closure-compiler --js=safe-email.js --js_output_file=dist/safe-email.min.js","test":"echo \"No test specified\"","lint-js":"lynt --env \"browser\"","lint-md":"markdownlint **/*.md --ignore node_modules","lint-md-urls-relative":"remark . --frail --use remark-validate-links","lint-md-consistency":"remark . --frail --use remark-preset-lint-consistent"},"repository":{"type":"git","url":"git+https://github.com/undergroundwires/safe-email.git"},"author":{"name":"npm@erkinekici.com"},"license":"MIT","bugs":{"url":"https://github.com/undergroundwires/safe-email/issues"},"homepage":"https://github.com/undergroundwires/safe-email#readme","devDependencies":{"google-closure-compiler":"^20200719.0.0","lynt":"^0.5.5","markdownlint-cli":"^0.23.2","remark-cli":"^8.0.1","remark-lint-no-dead-urls":"^1.1.0","remark-preset-lint-consistent":"^3.0.1","remark-validate-links":"^10.0.2"},"dependencies":{},"_id":"safe-email@1.1.1","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-au4r/kl2010T9uUo2DsrAr0CvR3rE7K7HphNDSAgCb9fkX4w9SrQQYivG6MHQnQ2N413G/gDpyQ/CjhagSOciw==","shasum":"f4cd448e4385c4f40274707ee4826bc6d15f7075","tarball":"https://registry.npmjs.org/safe-email/-/safe-email-1.1.1.tgz","fileCount":10,"unpackedSize":831727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHx7FCRA9TVsSAnZWagAAALsQAIuEpDLsH1y3nIQ6n82R\npPoHgL54av9ISEQag0Y+HN7BeYAlwiIDH7cfHpVMM5RHYWhtfFTjZdfgUTvZ\nECvKwyMBldDSGYItVxIL92HxvjcRIoFJ9uXE5PQtFuMyd5lqdAdWRsdMImGZ\nZY3g9liOcVPYGrssoaLUQ0FmJ+wZofOkWceBmOjcbx7W6qpSpnhfJyXxoSlb\nLtEs1t9PstSBrocQ9s5ZSfyz4i5dfjNqYrnLjVNmZ7NMvPV/zOUqmLacFAkX\nsjjM6sW470a8RTSdX//bYnVUgZYxlUGGX7WY4fGpQ7o/qpZMBZ1XRm67w2Pv\nbgIEoFy6TS09k9xRN7P+0uZqC4aboua3TqR5eyN5QamGc1XyFoZ1GKUYaTGi\nvCPsYa451X1PVtqC6iuSbMzgZzrsVE53Nu+JA2BsT2ybAfMV5FPtEwF/Xlqp\nyrsxIxEJy+Q0Ug/+gkGyAqFWmNS8qBxdheQ2xVNvTw02JypC5HO+wdxnRomv\nHQ9jYaC0VRX1VLknFivJAioWnBxfpefUCYNcJV/3vHItYNLW4icM1XtKDUI9\nWXogDGHhjAoMLuYSqAG/hbonWelzu3DzUOU01BZjXMdorjZ28ZvAM8wdFOmj\nrhuXLc3PGYJR3tctXpQmC/FXNh49Wb4sSbN8ZejHXzjBaknvSgJD5kNWU1KK\nK/O6\r\n=Ma0i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrfWb6Y3iSTx5YItX6q59XywBPDlRZPX6VLB9jFo9L9QIhAIn2v+OKrqvqzQMaf0xJxWoxX6QghBDblM8EW22rH6ZS"}]},"maintainers":[{"name":"undergroundwires","email":"npm@erkinekici.com"}],"_npmUser":{"name":"undergroundwires","email":"npm@erkinekici.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/safe-email_1.1.1_1595875012174_0.22470668868060906"},"_hasShrinkwrap":false}},"maintainers":[{"name":"undergroundwires","email":"npm@erkinekici.com"}],"description":"Easy way to obfuscate e-mails to protect them from spams through scraping bots","homepage":"https://github.com/undergroundwires/safe-email#readme","repository":{"type":"git","url":"git+https://github.com/undergroundwires/safe-email.git"},"author":{"name":"npm@erkinekici.com"},"bugs":{"url":"https://github.com/undergroundwires/safe-email/issues"},"license":"MIT","readme":"# safe-email\n\n> 🛡️📧 Protect e-mails against spam and scraping bots\n\n[![](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/undergroundwires/safe-email/issues)\n[![](https://github.com/undergroundwires/safe-email/workflows/Publish/badge.svg)](./.github/workflows/publish.yaml)\n[![](https://github.com/undergroundwires/safe-email/workflows/Build%20&%20test/badge.svg)](./.github/workflows/build-and-test.yaml)\n[![](https://github.com/undergroundwires/safe-email/workflows/Bump%20&%20release/badge.svg)](./.github/workflows/bump-and-release.yaml)\n[![](https://github.com/undergroundwires/safe-email/workflows/Quality%20checks/badge.svg)](./.github/workflows/quality-checks.yaml)\n[![](https://img.shields.io/npm/v/safe-email)](https://www.npmjs.com/package/safe-email)\n[![Auto-versioned by bump-everywhere](https://github.com/undergroundwires/bump-everywhere/blob/master/badge.svg?raw=true)](https://github.com/undergroundwires/bump-everywhere)\n<!-- [![](https://img.shields.io/npm/dm/safe-email)](https://www.npmjs.com/package/safe-email)\n[![](https://data.jsdelivr.com/v1/package/npm/safe-email/badge?style=rounded)](https://www.jsdelivr.com/package/npm/safe-email) -->\n\nEasy way to obfuscate e-mails to have spam protection against scraping bots.\n\n- Vanilla JavaScript only ✔️\n- Very lightweight with no dependencies ✔️\n- Easy to configure by using HTML attributes ✔️\n\n## How it works 🛡️\n\n- Base64 encoding of e-mail\n- CSS tricks to show the right text only to humans\n- Obfuscating HTML text of the e-mail\n\n## Import\n\n### Option A: Use CDN\n\nIt's the simplest way. Just add it to your page:\n\n```html\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/safe-email@1.1.1/dist/safe-email.min.js\"></script>\n```\n\n### Option B: Install\n\n- Using NPM (recommended): `npm install safe-email --save`\n- Using bower: `bower install undergroundwires/safe-email`\n- As a git submodule:\n  - Go to the folder you wish to have the repository\n  - Run `git submodule add https://github.com/undergroundwires/safe-email`\n- ❗ Only CDN and NPM solutions will have minified files with polyfills (`dist/` folder)\n\n```html\n<script type=\"text/javascript\" src=\"/node_modules/safe-email/dist/safe-email.min.js\"></script>\n```\n\n*[top↑](#safe-email)*\n\n## Usage\n\n### Examples\n\n#### Simplest\n\n```html\n  <a title=\"Email\" href=\"#\" data-email_b64=\"dW5kZXJncm91bmR3aXJlc0BnaXRodWIuY29t\"></a>\n```\n\n[See it live on CodePen](https://codepen.io/undergroundwires/pen/XWbLMOL)\n\n#### With all properties\n\n```html\n  <a title=\"Email\" href=\"#\" data-email_b64=\"dW5kZXJncm91bmR3aXJlc0BnaXRodWIuY29t\"\n    data-body=\"Hello!\" data-subject=\"About website\"></a>\n```\n\n[See it live on CodePen](https://codepen.io/undergroundwires/pen/MWwMpRL)\n\n#### With icon\n\n```html\n<a title=\"Email\" href=\"#\" data-email_b64=\"dW5kZXJncm91bmR3aXJlc0BnaXRodWIuY29t\">\n    <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 4h16c1.1.1 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1.1-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path><polyline points=\"22,6 12,13 2,6\"></polyline></svg>\n</a>\n```\n\n[See it live on CodePen](https://codepen.io/undergroundwires/pen/GRJbWaE)\n\nAs icon is an inner HTML of the parent `<a>` your e-mail will not be rendered.\n\n### Properties\n\n| Property | Explanation | Required / Default |\n| -------- | ----------- | -------- |\n| **`data-email_b64`** | Base64 encoded text of your e-mail. You can encode your e-mail [here](https://www.base64encode.org/). | Required |\n|  **`data-body`** | Body of the e-mail | Optional, Defaults to `Hi!` |\n|  **`data-subject`** | Subject of the e-mail | Optional,  Defaults to root domain name + path, e.g. `abc.com/path` |\n\nAny element that has **`data-email_b64`** property defined will have obfuscated `mailto:` pointing to the given e-mail address. If owner element of this property has no inner HTML, then the e-mail (in obfuscated form) will be rendered.\n\n*[top↑](#safe-email)*\n\n## Package contents\n\nThe deployed packages includes a `dist/` folder that adds polyfills to the files and distributes them as:\n\n- minified (`.min.js`) files for production usage\n- non-minified (`.js`) files for debugging\n\n*[top↑](#safe-email)*\n\n## GitOps\n\nCI/CD is fully automated for this repo using different Git events & GitHub actions.\n\n![safe-email continuous integration and deployment flow](./img/gitops.png)\n\n*[top↑](#safe-email)*\n","readmeFilename":"README.md"}