github-identicon
v1.0.7
Published
GitHub's identicon algorithm written in JS
Readme
github-identicon
GitHub's identicon algorithm written in JS, crudely ported from https://github.com/dgraham/identicon
Install
npm install github-identiconUsage
import { writeFileSync } from "node:fs";
import { identicon } from "github-identicon";
let id = Math.floor(Math.random() * 283045200);
const icon = identicon(id, 500).buffer;
writeFileSync(`${id}.png`, icon);Notes
GitHub's identicons are taken from the ID of the account, not the username of it; technically you can use anything other than a number, but it has no real value.
