Socket
Socket
Sign inDemoInstall

crypto-uid

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    crypto-uid

Cryptographically secure UIDs


Version published
Weekly downloads
30
increased by30.43%
Maintainers
1
Install size
93.5 kB
Created
Weekly downloads
 

Readme

Source

UID Generator

A small package for generating cryptographically secure UIDs in the browser, safe for both cookie and URL usage.

npm GitHub Workflow Status Coveralls github branch

This package is a mirror of uid-safe, but meant to be used in a browser env. Additionally, it comes bundled with TypeScript typings.

Table of Contents

Installation


You can install this package from NPM:

npm add crypto-uid

Or with Yarn:

yarn add crypto-uid
CDN

For CDN, you can use unpkg:

https://unpkg.com/crypto-uid/dist/bundles/crypto-uid.umd.min.js

The global namespace for crypto-uid is cryptoUid:

const id = cryptoUid(6);

Usage


ES6

Generate a random UID:

import uid from 'crypto-uid';
const id = uid(6);
CommonJS

Generate a random UID:

const uid = require('crypto-uid');
const id = uid(6);

Browser Support


You can expect this lib to run wherever Web Crypto API is supported.

Contribute


If you wish to contribute, please use the following guidelines:

Keywords

FAQs

Last updated on 06 Sep 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc