UNPKG

fantasy-name-generator

Version:

An easy to use race-based fantasy name generator. With TypeScript!

17 lines (16 loc) 759 B
export declare type RaceWithGenderType = "cavePerson" | "dwarf" | "halfling" | "gnome" | "elf" | "highelf" | "fairy" | "highfairy" | "darkelf" | "drow" | "halfdemon" | "dragon" | "angel"; export declare type RaceWithoutGenderType = "demon" | "goblin" | "orc" | "ogre"; export declare type OtherRaceType = RaceWithoutGenderType | "human"; export declare type RaceType = RaceWithGenderType | OtherRaceType; declare type Sorted = () => string[]; declare type GenerateName = (race: string, options?: { gender?: "male" | "female"; allowMultipleNames?: boolean; }) => string | Error; export declare const allRaces: { sorted: Sorted; racesWithGender: string[]; otherRaces: string[]; }; export declare const generateName: GenerateName; export {};