# small-uuid

> A small, url friendly, base64 encoded uuid module

Latest version **1.0.1** (published 2016-06-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install small-uuid
pnpm add small-uuid
yarn add small-uuid
bun add small-uuid
```

## 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.1 |
| Published | 2016-06-13 |
| First published | 2016-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Eric Herbrandson |
| Maintainers | herbrandson |
| Keywords | guid, uuid |

## Links

- npm: https://www.npmjs.com/package/small-uuid
- Repository: https://github.com/herbrandson/short-uuid
- Homepage: https://github.com/herbrandson/short-uuid#readme
- Issues: https://github.com/herbrandson/short-uuid/issues
- npm.io page: https://npm.io/package/small-uuid

## Dependencies (1)

- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.7

## 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.1 (latest) — 2016-06-13
- 1.0.0 — 2016-06-12

## README

# small-uuid
> A short, url friendly, base64 encoded uuid module

This module creates uuid/guid strings that are short then the standard '00000000-0000-0000-0000-000000000000' format.
Short uuids will be 22 characters long (instead of 36) and a basically a base64 encoded string with the trailing "==" removed and any "/" replaced with "-" (in order to make them play nice in a url).


## Installation
Install via `npm`:

```
$ npm install small-uuid
```


## Usage

Create a short uuid
``` js
var uuid = require('small-uuid');
var id = uuid.create();
// "id" will equal something like "NaTPOgp1QUuB6Gm5tAdcSw"
```

Create from a buffer
``` js
var uuid = require('small-uuid');
var buffer = new Buffer('NaTPOgp1QUuB6Gm5tAdcSw==', 'base64');
var id = uuid.fromBuffer(buffer);
// "id" will equal "NaTPOgp1QUuB6Gm5tAdcSw"
```

Create a buffer from a short uuid
``` js
var uuid = require('small-uuid');
var buffer = uuid.toBuffer('NaTPOgp1QUuB6Gm5tAdcSw');
```

Create from a standard uuid hex string
``` js
var uuid = require('small-uuid');
var id = uuid.fromHex('35a4cf3a-0a75-414b-81e8-69b9b4075c4b');
// "id" will equal "NaTPOgp1QUuB6Gm5tAdcSw"
```

Create a standard hex string from a short uuid
``` js
var id = uuid.toHex('NaTPOgp1QUuB6Gm5tAdcSw');
// "id" will equal "35a4cf3a-0a75-414b-81e8-69b9b4075c4b"
```

## Authors

**Eric Herbrandson** ([eric@herbrandson.com](eric@herbrandson.com))



## License
Copyright (c) 2016 Eric Herbrandson

Released under the MIT license

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