npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-uuid

v2.0.4

Published

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

Readme

react-native-uuid

GitHub license npm npm downloads total npm downloads GitHub watchers GitHub stars GitHub forks open bugs total open issues GitHub pull requests

Packagephobia Bundlephobia CI Status Node.js Version TypeScript

react-native-uuid is a zero-dependency TypeScript implementation of RFC4122 standard A Universally Unique IDentifier (UUID) URN Namespace. Please note, this library uses pseudo random generator based on top of Math.random. New version with hardware support is WIP.

Heavily inspired by:

Huge thanks to Randy Coulman for the early version of a code.

Getting started

Requirements

  • Node.js: 18.0.0 or higher (16.x also supported)
  • npm: 9.0.0 or higher

Installation

npm install react-native-uuid

Creating a UUID

import uuid from 'react-native-uuid';
uuid.v4(); // ⇨ '11edc52b-2918-4d71-9058-f7285e29d894'

Development

Available Scripts

# Install dependencies
npm install

# Run tests
npm test
npm test -- --watch          # Watch mode
npm test -- --coverage       # With coverage report

# Linting and formatting
npm run lint                  # Lint TypeScript and JavaScript
npm run prettier:write        # Format all files
npm run prettier:check        # Check formatting without changes

# Building
npm run build                 # Build TypeScript to JavaScript
npm run prepublishOnly        # Build before publishing (auto on npm publish)

# Benchmarking
npm run bench:rn              # Generate benchmark matrix for RN 0.71 - 0.77
npm run bench:security        # Run security benchmark with pass/fail thresholds

# Documentation
npm run docs                  # Generate TypeDoc documentation

Benchmarking

We keep a baseline benchmark matrix for major React Native versions:

  • React Native: 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77
  • Cases: v1, v3, v4, v5, validate, parse, unparse
  • Stored benchmark results: benchmarks/results/rn-version-benchmark.md
  • Stored benchmark data: benchmarks/results/rn-version-benchmark.json
  • Stored test report: benchmarks/results/test-results.json

Generate fresh results locally:

npm run bench:rn
npm test -- --runInBand --json --outputFile benchmarks/results/test-results.json
npm run bench:security
npm run bench:figures

Charts

React Native Benchmark Chart Security Benchmark Chart Test Results Chart

Security Benchmarking

The security benchmark is designed as a pass/fail gate for randomness quality and misuse safety checks.

  • Command: npm run bench:security
  • Stored report: benchmarks/results/security-benchmark.md
  • Stored data: benchmarks/results/security-benchmark.json
  • CI workflow: .github/workflows/security-benchmark.yml

Current threshold gates:

  • v4 sample collisions: 0
  • Cross-batch overlap (restart proxy): 0
  • Monobit test z-score: <= 4
  • Runs test z-score: <= 4
  • RNG chi-square score (256 bins): <= 420
  • Malformed input crashes: 0

The CI job fails if any threshold is exceeded.

Documentation

Methods documentation is available here

Troubleshooting

Previous version has been based on randombytes that is not compatible with react-native out of the box. Please submit an issue if you found a bug.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Sponsorship

Thank you to our sponsors:

License

MIT

Copyright (c) 2016-2026 Eugene Hauptmann