@bob-supply/sdk
v0.1.0
Published
Framework-agnostic helpers for [bob.supply](https://bob.supply) avatar URLs.
Readme
@bob-supply/sdk
Framework-agnostic helpers for bob.supply avatar URLs.
Install
npm install @bob-supply/sdkUsage
import { bobAvatarUrl } from "@bob-supply/sdk";
const url = bobAvatarUrl("alice");
// https://bob.supply/alice?format=pngSeeds are URL-encoded before they are added to the URL:
bobAvatarUrl("alice bob");
// https://bob.supply/alice%20bob?format=pngAPI
bobAvatarUrl(seed, options?)
Returns a deterministic bob.supply avatar URL for seed.
function bobAvatarUrl(seed: string, options?: BobAvatarUrlOptions): string;Options:
type BobAvatarUrlOptions = {
readonly format?: "png";
};An empty or whitespace-only seed throws a TypeError.
DefaultBobAvatarBaseUrl
The production avatar service origin:
const DefaultBobAvatarBaseUrl = "https://bob.supply";