animal-id

0.0.1 • Public • Published

animal-id

generates easily recognizable ids for logs and such.

How to use

npm install animal-id

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

then:

// 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

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    8

Package Sidebar

Install

npm i animal-id

Weekly Downloads

8

Version

0.0.1

License

MIT

Last publish

Collaborators

  • tangmi