# uuid4

> Node UUID v4 Generator

Latest version **2.0.3** (published 2022-08-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install uuid4
pnpm add uuid4
yarn add uuid4
bun add uuid4
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2022-08-07 |
| First published | 2014-10-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/uuid4) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Michael J. Ryan |
| Maintainers | tracker1 |
| Keywords | node, uuid-v4, uuid, guid |

## Links

- npm: https://www.npmjs.com/package/uuid4
- Repository: https://github.com/tracker1/node-uuid4
- Issues: https://github.com/tracker1/node-uuid4/issues
- npm.io page: https://npm.io/package/uuid4

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2022-08-07
- 2.0.2 — 2020-06-13
- 2.0.1 — 2020-06-13
- 2.0.0 — 2020-06-13
- 1.1.4 — 2018-10-02
- 1.1.3 — 2018-10-02
- 1.1.2 — 2018-09-20
- 1.1.1 — 2018-09-20
- 1.1.0 — 2018-09-20
- 1.0.0 — 2014-10-14

## README

# uuid4

A Node.js module for generating and validation V4 UUIDs

NOTE: as of Version 2, legacy browsers are no longer supported, you can keep using 1.x if you need
to support modern and legacy browsers.

## Install

```bash
$ npm install uuid4
```

## Usage

```javascript
import uuid4 from "uuid4";

// Generate a new UUID
var id = uuid4();

// Validate a UUID as proper V4 format (case-insensitive)
uuid4.valid(id); // true
```

### Direct in Browser or Deno

```
import uuid4 from 'https://cdn.jsdelivr.net/gh/tracker1/node-uuid4/browser.mjs';

// or

const { default: uuid4 } = await import('https://cdn.jsdelivr.net/gh/tracker1/node-uuid4/browser.mjs')
```

### Deno

Use the canonical implementation instead.

```
import { v4 as uuid4 } from "https://deno.land/std/uuid/mod.ts";

const id = uuid4.generate();

console.log(id);
console.log(uuid4.validate(id));
```

## License

ISC License

---
_Source: https://npm.io/package/uuid4 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
