hippy-hippo
v0.0.1
Published
Generate `{adjective} {animal}`.
Downloads
63
Readme
hippy-hippo
Generate {adjective} {animal}
.
Installation and import
Node
npm i -s hippy-hippo
// in node script files
const { HippyHippo } = require('hippy-hippo/dist/hippy-hippo-umd')
ESM
// In script[module]
import { HippyHippo } from 'https://unpkg.com/hippy-hippo/hippy-hippo-esm.js'
Other browser
<!-- in html -->
<script src="https://unpkg.com/hippy-hippo/dist/hippy-hippo-umd.js"></script>
// in js
const { HippyHippo } = window.HippyHippo
Usage
Basic usage
const anon1 = HippyHippo.getNickName() // some {adjective} {animal}
const anon2 = HippyHippo.getNickName() // another {adjective} {animal}
anon1 !== anon2 // *likely* the case
Use a seed
const randomNumber = HippyHippo.getRandomId()
const anon1 = HippyHippo.getNickName(randomNumber) // some {adjective} {animal}
const anon2 = HippyHippo.getNickName(randomNumber) // same {adjective} {animal}
anon1 === anon2 // always the case
Use custom library
const sulkyAnimal = HippyHippo.getNickName(null, ['sulky']) // sulky {animal}
const adjAnimal = HippyHippo.getNickName(null, null, ['hedgehog', 'Snake']) // {adjective} hedgehog|Snack
License
MIT