UNPKG

lesetid

Version:

A dead simple read time estimation

27 lines (25 loc) 868 B
import { CountResult, Estimation, Options, WordFN } from "./utils-CPI_D2gy.cjs"; //#region src/index.d.ts declare const DEFAULT_OPTIONS: { wordsPerMinute: number; charsPerMinute: number; isWord: WordFN; }; /** * Counts the number of words and characters in the given text. * * @param {string?} text - the text to count words and characters in. * @param {Options} [options] - the options to use. * @returns {CountResult} the result of words and characters. */ declare function count(text?: string, options?: Options): CountResult; /** * Estimate a text's reading time. * * @param {string} text - the text to estimate. * @param {Options} [options] - the options to use. * @returns {Estimation} the estimation result. */ declare function estimate(text?: string, options?: Options): Estimation; //#endregion export { DEFAULT_OPTIONS, count, estimate };