npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

safe-email

v1.1.1

Published

Easy way to obfuscate e-mails to protect them from spams through scraping bots

Readme

safe-email

🛡️📧 Protect e-mails against spam and scraping bots

Auto-versioned by bump-everywhere

Easy way to obfuscate e-mails to have spam protection against scraping bots.

  • Vanilla JavaScript only ✔️
  • Very lightweight with no dependencies ✔️
  • Easy to configure by using HTML attributes ✔️

How it works 🛡️

  • Base64 encoding of e-mail
  • CSS tricks to show the right text only to humans
  • Obfuscating HTML text of the e-mail

Import

Option A: Use CDN

It's the simplest way. Just add it to your page:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/safe-email.min.js"></script>

Option B: Install

  • Using NPM (recommended): npm install safe-email --save
  • Using bower: bower install undergroundwires/safe-email
  • As a git submodule:
    • Go to the folder you wish to have the repository
    • Run git submodule add https://github.com/undergroundwires/safe-email
  • ❗ Only CDN and NPM solutions will have minified files with polyfills (dist/ folder)
<script type="text/javascript" src="/node_modules/safe-email/dist/safe-email.min.js"></script>

top↑

Usage

Examples

Simplest

  <a title="Email" href="#" data-email_b64="dW5kZXJncm91bmR3aXJlc0BnaXRodWIuY29t"></a>

See it live on CodePen

With all properties

  <a title="Email" href="#" data-email_b64="dW5kZXJncm91bmR3aXJlc0BnaXRodWIuY29t"
    data-body="Hello!" data-subject="About website"></a>

See it live on CodePen

With icon

<a title="Email" href="#" data-email_b64="dW5kZXJncm91bmR3aXJlc0BnaXRodWIuY29t">
    <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>
</a>

See it live on CodePen

As icon is an inner HTML of the parent <a> your e-mail will not be rendered.

Properties

| Property | Explanation | Required / Default | | -------- | ----------- | -------- | | data-email_b64 | Base64 encoded text of your e-mail. You can encode your e-mail here. | Required | | data-body | Body of the e-mail | Optional, Defaults to Hi! | | data-subject | Subject of the e-mail | Optional, Defaults to root domain name + path, e.g. abc.com/path |

Any 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.

top↑

Package contents

The deployed packages includes a dist/ folder that adds polyfills to the files and distributes them as:

  • minified (.min.js) files for production usage
  • non-minified (.js) files for debugging

top↑

GitOps

CI/CD is fully automated for this repo using different Git events & GitHub actions.

safe-email continuous integration and deployment flow

top↑