Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@voxmedia/identity-library

Package Overview
Dependencies
Maintainers
7
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voxmedia/identity-library

This is a small JavaScript library used to send a salted hash of a user's UID to partners. It takes a privacy-first approach to ensure we can safely share sets of user data between trusted third parties, while preventing the possibility of the sets being

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

Identity Library

This is a small JavaScript library used to send a salted hash of a user's UID to partners. It takes a privacy-first approach to ensure we can safely share sets of user data between trusted third parties, while preventing the possibility of the sets being matched between partners or the source of the data.

Usage

You can import identity-library into a project using module bundling like Webpack, or into a Node.js project:

yarn add @voxmedia/identity-library

# or:

npm install @voxmedia/identity-library

Import the package and call the default export:

import identityFor from '@voxmedia/identity-library';

async function sendIdentityToPartner() {
  const privateId = fetchUserPrivateId(); // e.g. from a cookie

  const shareableId = await identityFor('<PARTNER_NAME>', privateId);
}

You can also use this directly in browser with a script tag:

<script src="https://unpkg.com/@voxmedia/identity-library@latest/dist/identity-library.umd.js"></script>

<script>
  async function sendIdentityToPartner() {
    const privateId = fetchUserPrivateId(); // e.g. from a cookie

    const shareableId = await identityFor('<PARTNER_NAME>', privateId);
  }
</script>

Browser Support

This library requires Promise support, i.e. it will not work out of the box on IE11. You can add a Promise polyfill if you want to support this library.

Development

yarn dev

If you want to symlink the development version of this library into another local project, run the following inside this project's repo:

yarn link

Then, follow the instructions to use it in a different project.

Releasing

This project is automatically released with semantic-release within GitHub Actions. A couple notes:

  • You do NOT need to update the version in package.json manually
  • Instead, you should use special semantic-release prefixes in your commit messages.
    • fix: If you are making a patch change which merits a patch version bump
    • feat: If you are making a minor change which merits a minor version bump
    • BREAKING CHANGE: If you are making a breaking change which merits a major version bump
    • chore, docs, test, refactor, etc: If you are making a change which does not require any version change
    • Any commit lacking a prefix will be considered a no-op (no version change)
    • If you forgot to include any prefixes, you can use the "Squash" commit feature when merging the PR to edit the commit message to add an appropriate prefix
  • Prerelease branches are available at alpha and beta. Use these to push changes which will not increment the overall version - great for working on big new features.

FAQs

Package last updated on 22 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc