# uuidv5

> Generates named version 5 UUIDs

Latest version **1.0.0** (published 2017-01-16) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-01-16 |
| First published | 2014-09-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Erin Dachtler |
| Maintainers | download |
| Keywords | uuid, v5, sha1, guid |

## Links

- npm: https://www.npmjs.com/package/uuidv5
- Repository: https://github.com/download13/uuidv5
- Issues: https://github.com/download13/uuidv5/issues
- npm.io page: https://npm.io/package/uuidv5

## 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

- 1.0.0 (latest) — 2017-01-16
- 0.0.1 — 2016-11-08
- 0.0.0 — 2014-09-23

## README

# UUIDv5

## Install

`npm install uuidv5`


## Use

`var uuidv5 = require('uuidv5');`

If you are unfamiliar with v5 UUIDs, read [this](http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_5_.28SHA-1_hash.29). For a deeper look, read [RFC 4122](http://tools.ietf.org/html/rfc4122).


## API

### uuidv5(namespace, name, [raw_output])

* `namespace` can be 'url', 'dns', 'oid', 'x500', or 'null'. If it's none of those, it must be a UUID to use as a namespace, either in string or Buffer form.
* `name` can be a string or Buffer. What it should contain is namespace-dependent.
* `raw_output` is an optional flag. If set to `true`, the UUID will be returned as a Buffer instead of as a string.

### uuidv5.uuidToString(uuid)

Takes a Buffer-form uuid and returns it as a string.

### uuidv5.uuidFromString(uuidStr)

Takes a UUID as a string (with or without dashes [-]) and returns it as a Buffer.


### Examples

```javascript
var uuidv5 = require('uuidv5');

// Generate a UUID in the default URL namespace
var urlUUID = uuidv5('url', 'http://google.com/page');

// Default DNS namespace
var dnsUUID = uuidv5('dns', 'google.com');

// Create your own namespace
var privns = uuidv5('null', 'my-private-namespace', true); // Buffer form is more efficient
var privUUID = uuidv5(privns, 'some-named-thing');
```

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