Skip to content

tbusillo/teensy-uuid

Repository files navigation


Teensy Tiny UUID v4 Generator

An RFC 4122 compliant UUID v4 generator compatible with browser and Node APIs.


CI status


Features

  • 3.5kb minified, with no dependencies
  • RFC 4122 compliant UUID v4
  • Isomorphic - it works in the browser as well as with Node.js, without use of browserify, a bundler, or other dependencies

Installation

npm install @teensy/uuid

yarn add @teensy/uuid

pnpm add @teensy/uuid

Usage

import uuid from '@teensy/uuid'

const id = uuid() // example output: 8b2e5e9e-2a5b-4e7b-8e1a-4b1d9a4e7f2a

Releasing

If you intend to distribute your package via a manager (e.g., npm, yarn, etc), this template includes standard-version.

Releasing

To release a new version, run the following command:

pnpm run release

Canary versions are released automatically on every push to main via CI. To use a canary version in your project, use @teensy/uuid@canary.

License

MIT License

Copyright (c) 2023 Tom

About

A teensy tiny UUIDv4 generator compatible with browser and Node APIs

Resources

License

Stars

Watchers

Forks