0.0.1 • Published 4 years ago
hippy-hippo v0.0.1
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.HippyHippoUsage
Basic usage
const anon1 = HippyHippo.getNickName() // some {adjective} {animal}
const anon2 = HippyHippo.getNickName() // another {adjective} {animal}
anon1 !== anon2 // *likely* the caseUse 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 caseUse custom library
const sulkyAnimal = HippyHippo.getNickName(null, ['sulky']) // sulky {animal}
const adjAnimal = HippyHippo.getNickName(null, null, ['hedgehog', 'Snake']) // {adjective} hedgehog|SnackLicense
MIT
0.0.1
4 years ago