monster-mash
v1.0.0
Published
A generator of more memorable and pretty unique IDs (especially in the sense of "that's an ID you don't see every day!").
Downloads
30
Maintainers
Readme
Monster Mash - a very unique ID generator
A generator of more memorable and pretty unique IDs (especially in the sense of "that's an ID you don't see every day!").
To be more precise, there is this getUniqueMonster()
function that returns a monster with its color as a slug.
Like maroon-vampire
or purple-sphinx
or cyan-cyclops
!
Example
Check out the ./example
directory. I mean...
Install
Import it into your project...
npm install monster-mash
or use a CDN...
<script src="https://unpkg.com/monster-mash/dist/monster-mash.umd.js"></script>
...for whatever reason.
Usage
Browser
<script src="./path/to/monster-mash.umd.js"></script>
<script>
const uniqueMonster = getUniqueMonster(); // lavender-banshee
</script>
Node.js
import getUniqueMonster from 'monster-mash';
const uniqueMonster = getUniqueMonster(); // orchid-bogeyman
But... why?!?
Okay, here is the thing. During development, I needed some unique IDs and made them with a hash encoded random number. The problem was that working with them sucked because I couldn't keep their value in my head for longer than 500 microseconds. At best. But monsters? With a cool color? That totally works for me.
Okay, to be honest, the color part was born out of necessity because I figured 72 monsters might not be what one would call a big data set. But adding 31 colors to the mix will make that exactly... about... a lot of colorful monsters!