Socket
Socket
Sign inDemoInstall

react-native-uuid

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-uuid

react-native-uuid is a zero-dependency TypeScript implementation of RFC4122.


Version published
Weekly downloads
217K
increased by1.93%
Maintainers
1
Weekly downloads
 
Created

What is react-native-uuid?

The react-native-uuid package is a utility for generating universally unique identifiers (UUIDs) in React Native applications. It supports various versions of UUIDs, including v1, v4, and v5, making it versatile for different use cases where unique identifiers are required.

What are react-native-uuid's main functionalities?

Generate UUID v1

Generates a UUID based on the current timestamp and the node ID (usually the MAC address). This is useful for generating unique IDs that are time-based.

const uuidv1 = require('react-native-uuid').v1;
const id = uuidv1();
console.log(id);

Generate UUID v4

Generates a random UUID. This is useful for creating unique identifiers that do not need to be predictable or based on any specific input.

const uuidv4 = require('react-native-uuid').v4;
const id = uuidv4();
console.log(id);

Generate UUID v5

Generates a UUID based on a namespace and a name. This is useful for generating unique IDs that are derived from specific inputs, ensuring consistency for the same input.

const uuidv5 = require('react-native-uuid').v5;
const MY_NAMESPACE = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
const id = uuidv5('hello.example.com', MY_NAMESPACE);
console.log(id);

Other packages similar to react-native-uuid

Keywords

FAQs

Package last updated on 14 Mar 2024

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