Socket
Socket
Sign inDemoInstall

react-native-random-uuid

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-random-uuid


Version published
Maintainers
1
Install size
19.8 kB
Created

Readme

Source

crypto.randomUUID for React Native

A small implementation of crypto.randomUUID for React Native.

Installation

npm install react-native-random-uuid
npx pod-install

💡 If you use the Expo managed workflow you will see "CocoaPods is not supported in this project" - this is fine, it's not necessary. This library works as a polyfill for the global crypto.randomUUID.

// Add this line to your `index.js`
import 'react-native-random-uuid'

Now you can use crypto.randomUUID anywhere.

console.log(crypto.randomUUID())

API

crypto.randomUUID()

The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.

Returns a string containing a randomly generated, 36 character long v4 UUID.

Keywords

FAQs

Last updated on 17 May 2023

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc