@teapotlabs/identeapots
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Indeteapots

Identeapots is a simple TypeScript library for generating identicon images.

Installation

npm i @teapotlabs/identeapots

Usage

The return value of the generateIdenteapot function is Data URL

import { generateIdenteapot } from "@teapotlabs/identeapots";

// data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACPEAAAH0C...
const identicon: string = generateIdenteapot("hello world", "salt");

Which can be used in <img> tags as src attribute.

<img src={identicon} alt="Example Identeapot" />

This will generate the following image:

Example

A complete example of a NextJS application is available in the /test folder

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Package Sidebar

Install

npm i @teapotlabs/identeapots

Weekly Downloads

32

Version

1.0.8

License

MIT

Unpacked Size

19.8 kB

Total Files

19

Last publish

Collaborators

  • lorenzofratus
  • ferrohd