Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
an generator for easily recognizable ids
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
adjectives.json
animal-id.js
animals.json
package.json
test.js

README.md

animal-id

generates easily recognizable ids for logs and such.

How to use

npm install animal-id

then:

var animal = require('animal-id');

// generate an adjective-animal pair
animal.getId(); // angry-buzzard
// ...with a prefix
animal.getId('animal'); // animal-angry-buzzard
// ...with a UUID tacked on the end
animal.getUuid(); // angry-buzzard-198fb2de-8ec7-4cf2-be5c-2446628c9ef
// ...or with a prefix and a UUID suffix
animal.getUuid('animal'); // animal-angry-buzzard-198fb2de-8ec7-4cf2-be5c-2446628c9ef

// or use your own adjectives/animals/separating strings
animal.useAnimals(['buzzard', 'human']);
animal.useAdjectives(['happy', 'angry']);
animal.useSeparator('_'); // use an underscore instead of a dash

Pretty blatantly uses the excellent node-uuid for uuid generation.

Something went wrong with that request. Please try again.