• Stars
    star
    803
  • Rank 56,759 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate Easy to Remember, Readable UUIDs, that are Shakespearean and Grammatically Correct Sentences πŸ₯³

uuid-readable Generic badge Generic Badge

Generic badge Generic badge

Generate Easy to Remember, Readable UUIDs, that are Shakespearean and Grammatically Correct Sentences πŸ₯³

Logo

  • Built on UUID v4
  • Optionally pass your UUID to generate a unique sentence
  • 128 Bit Crypto Secure
  • Grammatically correct sentences
  • Easy to remember
  • Has a Shakespeare feeling
  • Universally Unique Identifier
  • Generate Low Entropy 32 Bit Tokens

Example

128 Bit UUID Readable

Loren Chariot Addy the Titbit of Cholame questioned Cele Garth Alda and 16 windy frogs

Drucill Hubert Lewse the Comer of Avera rejoices Fiann Craggy Florie and 5 hard trouts

Jacquette Brandt John the Pectus of Barnsdall doubted Glenn Gay Gregg and 12 noisy stoats

Low Entropy 32 Bit

11 pretty dragonflies regularly sang

2 fat toads happily buzzed

Note

Think of it this way, it's impossible to remember 32 random characters in UUID, but these sentences even though hard can be remembered, and are definitely fun!

Alternatively, generate 32 bit readable small sentences from 128 bit UUID and check later if they match.

API

Thanks to uuid.rocks, we have an API Endpoint

curl https://uuid.rocks/plain?readable
# Joyce Ange Barrett the Orient of Alco killed Marlyn Hewett Lady and 11 strong bulls

Installation

npm install uuid-readable --save

Usage

const id = require('uuid-readable')

console.log( id.generate() )
// Cathleen d Dieball the Monolith of Alderson reflects Arly Arnie Keenan and 18 large ants

Pass your own UUID

console.log( id.generate(uuid) )

Inverse, get UUID back from Readable UUID

const uuid = '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
const readable = id.generate(uuid)
const inverse = id.inverse(readable)
 
inverse === uuid // true

Low Entropy 32bit Readable (Use as Readable Hash)

const short = id.short(uuid)
// 5 fat toads happily buzzed

// Check Later
id.check(short, uuid) //true

MongoDB

const id = require('uuid-readable')

readable_id: {
  'type': String,
  'default': id
}

// or use as real id

_id: {
  'type': String,
  'default': id
}

How does it work?

UUID is converted to 128 bits.

  • 12 bits for first name
  • 11 bits for middle name
  • 14 bits for last name
  • 13 bits for a personal pronoun
  • 13 bits for name of place
  • 10 bits for verb
  • 12 bits for first name
  • 11 bits for middle name
  • 14 bits for last name
  • 5 bits for number of animals
  • 6 bits for animal adjective
  • 7 bits for animal

For example, 7 bits for animal means we choose one animal from a list of atleast 2**7 = 128 animals

Alternatively, the inverse funcation proves that UUID and Readable UUID form a bijection, hence no loss of entropy.

Use Cases

  • Customer Support

You can remember parts of the id and that's enough to search it up and communicate throughout a large team. I will be using it as a secret generation for a service, and customer tickets.

Sponsors

Shakespeare Geek

More Repositories

1

names.io

A Global Exhaustive First and Last Name Database
Shell
728
star
2

browser-extension

Browser Extension Template with ESbuild builds, support for React, Preact, Typescript, Tailwind, Manifest V3/V2 support and multi browser build including Chrome, Firefox, Safari, Edge, Brave.
TypeScript
671
star
3

omg-curry

Curry All Code
JavaScript
137
star
4

react-fast-charts

Blazing Fast Charting Library in React with loading time less than 50ms
JavaScript
119
star
5

youtube-bg-react

Youtube video as background for HTML elements
TypeScript
38
star
6

url-request

The most advanced HTTP Client with Functional Chaining, Async/Await, Delay, Fork, Infinite Chaining and Repeat for building your Complex APIs easily.
JavaScript
28
star
7

hotstarlivestreamer

Download or Live Stream from Hotstar
PHP
12
star
8

golive

golive is a lightweight and improved live-server alternative written in Go
Go
7
star
9

oeis.haskell

A Collection of OEIS Sequences in Haskell
Haskell
5
star
10

vue-data-table

Vue Data Table With Filter, Sort and Complete Editability
Vue
4
star
11

newton-works

Lifetime Collection of Newton's Works
HTML
4
star
12

dl-rubiks-autodidactic-solver

Python
3
star
13

mathematics-pagerank

Python
3
star
14

absurd-sql-chrome-extension

JavaScript
3
star
15

github.zsh-theme

Github theme for Zsh
Shell
3
star
16

rational-parking-functions

Python
3
star
17

go-preact

go-preact is a template to create portable server apps with preact frontend in a single binary executable
TypeScript
2
star
18

wave-plus

An Wave Extension
JavaScript
2
star
19

some-proofs

1
star
20

vala-guide

A Guide for Vala Programming Language
TeX
1
star
21

ubuntuInit

Shell
1
star
22

first-bot

The Bot Search Engine
JavaScript
1
star
23

delhi.fm

TypeScript
1
star
24

saavn_downloader

Python
1
star
25

motion-control

Play Games Using Body Gestures
Python
1
star
26

minimal-ui

CSS
1
star
27

gn

Go
1
star
28

site-hungry

Eat 🀀, Digest 🀒 Sites and then Sleep πŸ₯±πŸ˜΄ on the Data
JavaScript
1
star
29

vue-date-picker

Vue
1
star
30

go-next

go-next is a template to create portable server apps in a single binary executable
Makefile
1
star