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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@privacyportal.org/privacy-kit

v0.1.6

Published

Lightweight and FOSS browser library bringing Privacy Portal features to your website users

Downloads

25

Readme

privacy-kit

License: MIT Live Demo

A lightweight browser library for integrating awesome privacy features to your website, proudly offered as Free and Open Source Software (FOSS) by our team at Privacy Portal.

Features in this library could require users to sign-in or register free accounts on Privacy Portal. This account registration is required for the operation of the user requested features.

Please check our Privacy Policy and Terms Of Service for more information.

Live Demo

🚀 Experience privacy-kit live: privacyportal.github.io/privacy-kit-demo

Installation

npm/yarn/pnpm: (best for privacy)

npm install @privacyportal.org/privacy-kit
import PrivacyKit from '@privacyportal.org/privacy-kit'

PrivacyKit.run({
  // Learn how you can get a client_id in the configuration section below
  client_id: process.env.CLIENT_ID
})

Manual: (best for privacy)

<!-- Manually download the privacy-kit.umd.js file from our latest GitHub Release -->
<script src="/assets/privacy-kit.umd.js"></script>
<script>
  window.PrivacyKit.run({
    client_id: "<YOUR_OAUTH_CLIENT_ID>"
  });
</script>

CDN (Script Tag):

<!-- Specific version with SRI -->
<script 
  src="https://cdn.jsdelivr.net/npm/@privacyportal.org/[email protected]/dist/privacy-kit.umd.js"
  integrity="sha384-Cgp+UAQtl4xg4oLDL4kOKEhfn4PSUjdzw4Z29qFM+S1l4lm0im8l3hK0sq1wRRq4"
  crossorigin="anonymous"
></script>

<!-- Latest minor version -->
<script
  src="https://cdn.jsdelivr.net/npm/@privacyportal.org/privacy-kit@0/dist/privacy-kit.umd.js"
  crossorigin="anonymous"
></script>

Manual + base64 encoded:

For websites created using Content Management Systems like WordPress (WP), if previous options are unavailable or restricted, you can embed privacy-kit directly into your website using Base64 encoding. In WP, this can be done by adding a 'Custom HTML' block and including a <script> tag with the Base64-encoded library code.

<!-- replace {{BASE64_ENCODED_LIB}} with the base64 encoded content of privacy-kit.umd.js -->
<script src="data:application/javascript;base64,{{BASE64_ENCODED_LIB}}"></script>

Configuration

PrivacyKit.run({
  client_id: "<YOUR_OAUTH_CLIENT_ID>",
  hide_my_email: true,
  subscribe_anonymoulsy: true,          // accepted values: [undefined, true, false, { set_name_field: true }]
  on_error: "alert"                     // accepted values: ["ignore", "alert", loggerObject]
});

How to get a client_id?

Privacy-Kit authorizes users using Privacy Portal's Open Authentication service. When a user requests a new alias, a Privacy Portal popup appears allowing users to securely authenticate with Privacy Portal and authorize your application to receive an email alias for the user.

In order to get a client_id, you must register your website as an OAuth Application on Privacy Portal. Learn More

Features

Hide-My-Email

Integrate Hide My Email functionality to your website without requiring any browser extension or app installation. Simply install the library on your website using one of the installation steps above and make sure hide_my_email is configured to true (it is enabled by default).

Hide My Email

When enabled, if a user clicks on an email input field, they are prompted to use "Hide My Email" to generate a Privacy Email Alias instead of their personal email. This email alias protects the user's privacy and only accepts emails from your registered domains thus preventing email address theft by third parties and completely eliminating unsollicited mail.

In order to use Hide My Email, you will need to register your application as an OAuth application on Privacy Portal. Our free plan is very generous and should cover most websites.

Subscribe Anonymously to Newsletter

Allow users to subscribe anonymously to your existing newsletter using email aliases instead of their personal email addresses. Simply install the library on your website using one of the installation steps above and make sure subscribe_anonymoulsy is configured to true (it is enabled by default).

Subscribe Anonymously

This features can very easily be integrated to your newsletter simply by adding an HTML button inside your form.

<form>
  <input type="email" name="form_fields[email]" id="form-field-email" placeholder="Email" required="required">
  <button type="submit">Subscribe</button>
  <!-- Add the following button to your newsletter form -->
  <button type="button" data-pp-action="subscribe-anonymously">
    <span>Subscribe Anonymously</span>
    <span>with Privacy Portal</span>
  </button>
</form>
/* you can style the subscribe anonymously button with some css like the following */
button[data-pp-action="subscribe-anonymously"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: black;
  color: white;
  height: auto;
  padding: 0.5rem;
  gap: 0.1rem;
}

button[data-pp-action="subscribe-anonymously"] > span:last-child {
  font-size: xx-small;
}

In order to use Subscribe Anonymously, you will need to register your application as an OAuth application on Privacy Portal. Our free plan is very generous and should cover most websites.