* Add option for IDs to have a prefix * Switch to suffixes to protect ID values * Document idSuffix * Fix validation error message consistency * Fix ID suffix regex test * Add tests * snapshot tests for idSuffix covering all 5 badge styles * tweak docs * update typescript definitions * badge-maker 4.1.0 release --------- Co-authored-by: chris48s <git@chris-shaw.dev>
15 lines
349 B
TypeScript
15 lines
349 B
TypeScript
interface Format {
|
|
label?: string
|
|
message: string
|
|
labelColor?: string
|
|
color?: string
|
|
style?: 'plastic' | 'flat' | 'flat-square' | 'for-the-badge' | 'social'
|
|
logoBase64?: string
|
|
links?: Array<string>
|
|
idSuffix?: string
|
|
}
|
|
|
|
export declare class ValidationError extends Error {}
|
|
|
|
export declare function makeBadge(format: Format): string
|