Socket
Socket
Sign inDemoInstall

@alexjamesmalcolm/human-readable-ids

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @alexjamesmalcolm/human-readable-ids

Generate human-readable ids from lists of easy-to-spell nouns and adjectives


Version published
Maintainers
1
Created

Readme

Source

human-readable-ids

Use JavaScript to generate human-readable ids from a list of animals and adjectives.

ids are in the format of adjective-animal-## such as:

  • silly-goose-37
  • quick-cobra-15
  • tricky-chicken-23
  • brave-ladybug-90

My problem is that I often want ids that I can type without having to look at twice (nor telling someone else twice). I should be able to shout one of these ids across the room to a coworker or spouse and have them be able to enter it without any confusion.

Currently the id space is 12,520,970 ids (539 adjectives * 230 animals * 101 numbers).

The goal is to have several billion possible combinations by adding more words as well as expanding the ids to have verbs and adverbs. For a larger address space now, consider:

  • Human Readable IDs for Node.js and Browser: https://github.com/linus/greg/
  • Human Readable IDs for Java: https://github.com/PerWiklander/IdentifierSentence
  • Human Readable IDs for Python: https://gist.github.com/4447660

All of these also have the benefit of bi-directional conversion, but not all of them have words which are easy to pronounce and spell.

Contributing

Please add more words that fit these criteria

  • Easy-to-spell - such that even my redneck dad can manage
  • Phonetically distinct - no words like bore/boar
  • Few syllables
  • Well-known

All of the words are sorted alphabetically (sort -u) and stored in the *.txt files. The pre-publish script outputs the formatted javascript.

Bad Examples

  • wednesday, hamster, ostrich (difficult to spell)
  • grey, gray, bore, boar (two ways of spelling the same word or sound)
  • prawn (not well-known)

Resources

Add more words and strategies from

TODO

Achieve 1 trillion ids with a combination such as

number adjective noun verb adverb

42-red-foxes-run-quickly

And allow choosing various formats based on the desired number of ids.

  • adjective noun number
  • number adjective noun verb

Keywords

FAQs

Last updated on 22 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc