1.0.3 • Published 3 years ago

anonymous-animals-gen v1.0.3

Weekly downloads
7
License
MIT
Repository
-
Last release
3 years ago

Install

npm install anonymous-animals-gen

How to use

  • generate
import anonymous from 'anonymous-animals-gen'
const { name, image, animal } = anonymous.generate();
// name   -> elastic giraffe
// image  -> data:image/png;base64,...
// animal -> giraffe

const { name, image, animal } = anonymous.generate({ prefix: "Anonymous" });

// name   -> Anonymous elastic giraffe
// image  -> data:image/png;base64,...
// animal -> giraffe

<img src={image} style={{background:'black'}}>
  • getImage
import anonymous from 'anonymous-animals-gen'
const { animal } = anonymous.generate();
const image = anonymous.getImage(animal);

// image  -> data:image/png;base64,...

Test

npm run test

License

The code is licensed under the MIT license while pictures belong to Google.