# yyid-node

> Generates a random uuid-like string (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) via crypto.randomBytes

Latest version **1.0.2** (published 2024-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install yyid-node
pnpm add yyid-node
yarn add yyid-node
bun add yyid-node
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-10-29 |
| First published | 2016-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jan Lelis |
| Maintainers | janlelis |
| Keywords | uuid, yyid, random, crypto |

## Links

- npm: https://www.npmjs.com/package/yyid-node
- Repository: https://github.com/janlelis/yyid-node.js
- Issues: https://github.com/janlelis/yyid-node.js/issues
- npm.io page: https://npm.io/package/yyid-node

## 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.2 (latest) — 2024-10-29
- 1.0.1 — 2016-03-01
- 1.0.0 — 2016-03-01

## README

# YYID for Node.js [![[ci]](https://github.com/janlelis/yyid-node.js/workflows/Test/badge.svg)](https://github.com/janlelis/yyid-node.js/actions?query=workflow%3ATest)

- Generates a [UUID#4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29)-like random string, but in contrast to [RFC 4122](https://tools.ietf.org/rfc/rfc4122.txt), omits the static bits
- Format: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` (128bit randomness)
- Use a crytographically solid source of randomness: [crypto.randomBytes](http://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback)
- See [yyid.js](https://github.com/janlelis/yyid.js) for an ESM browser version

## Install

```
$ npm install yyid-node
```

## Usage

```javascript
var yyid = require('yyid-node');
yyid(); // => '5ebd4295-92a2-c98b-9103-b1e5d16f2bfa'
```

## Other Versions

[YYID](https://github.com/micromodules/yyid) is available for more languages, such as Ruby, Elixir, and Rust.

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