@teensy/uuid
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

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

Package Sidebar

Install

npm i @teensy/uuid

Weekly Downloads

2

Version

0.0.16

License

MIT

Unpacked Size

49 kB

Total Files

8

Last publish

Collaborators

  • tbusillo