Socket
Socket
Sign inDemoInstall

uuid-browser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uuid-browser

browser-part from the uuid-package


Version published
Weekly downloads
760K
decreased by-19.62%
Maintainers
1
Weekly downloads
 
Created

What is uuid-browser?

The uuid-browser npm package is a simple, lightweight library for generating UUIDs (Universally Unique Identifiers) in browser environments. It provides various methods to create different versions of UUIDs, such as v1, v3, v4, and v5.

What are uuid-browser's main functionalities?

Generate UUID v1

UUID v1 is generated based on the current timestamp and the MAC address of the machine. This is useful for generating unique IDs that are time-based.

const uuidv1 = require('uuid-browser/v1');
const id = uuidv1();
console.log(id);

Generate UUID v3

UUID v3 is generated based on a namespace and a name using MD5 hashing. This is useful for generating deterministic UUIDs based on input strings.

const uuidv3 = require('uuid-browser/v3');
const id = uuidv3('name', uuidv3.DNS);
console.log(id);

Generate UUID v4

UUID v4 is generated randomly. This is the most commonly used version for generating unique IDs that do not need to be deterministic.

const uuidv4 = require('uuid-browser/v4');
const id = uuidv4();
console.log(id);

Generate UUID v5

UUID v5 is similar to v3 but uses SHA-1 hashing instead of MD5. This is useful for generating deterministic UUIDs with a different hashing algorithm.

const uuidv5 = require('uuid-browser/v5');
const id = uuidv5('name', uuidv5.DNS);
console.log(id);

Other packages similar to uuid-browser

FAQs

Package last updated on 24 Oct 2017

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