lesetid
Version:
A dead simple read time estimation
27 lines (25 loc) • 902 B
TypeScript
import { c as Options, l as WordFN, o as CountResult, s as Estimation } from "./utils-BANQrW57.js";
//#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 { count as n, estimate as r, DEFAULT_OPTIONS as t };