vegan-ipsum
Version:
Generates passages of vegan-themed placeholder text suitable for use in web pages, graphics, and more. Works in the browser, NodeJS, and React Native.
67 lines (66 loc) • 1.87 kB
TypeScript
import { LoremFormat } from "./constants/formats";
import { LoremUnit } from "./constants/units";
import { IPrng } from "./lib/generator";
import VeganIpsum from "./lib/VeganIpsum";
/**
* Parameters for generating vegan ipsum text.
*/
export interface IVeganIpsumParams {
/**
* Number of units to generate (e.g., paragraphs, sentences, or words).
* @default 1
*/
count?: number;
/**
* Format of the generated text (e.g., plain text or HTML).
* @default FORMAT_PLAIN
*/
format?: LoremFormat;
/**
* Minimum number of sentences per paragraph.
* @default 3
*/
paragraphLowerBound?: number;
/**
* Maximum number of sentences per paragraph.
* @default 7
*/
paragraphUpperBound?: number;
/**
* Custom random number generator.
*/
random?: IPrng;
/**
* Minimum number of words per sentence.
* @default 5
*/
sentenceLowerBound?: number;
/**
* Maximum number of words per sentence.
* @default 15
*/
sentenceUpperBound?: number;
/**
* Unit type for the generated text (e.g., paragraphs, sentences, or words).
* @default UNIT_SENTENCES
*/
units?: LoremUnit;
/**
* Custom word list to use for generating text.
* @default WORDS
*/
words?: string[];
/**
* Suffix to append to the generated text.
* @default ""
*/
suffix?: string;
}
/**
* Generates vegan ipsum text based on the provided parameters.
*
* @param params - Configuration options for generating vegan ipsum text.
* @returns Generated vegan ipsum text as a string.
*/
declare const veganIpsum: ({ count, random, format, paragraphLowerBound, paragraphUpperBound, sentenceLowerBound, sentenceUpperBound, units, words, suffix, }?: IVeganIpsumParams) => string;
export { veganIpsum, VeganIpsum };