UNPKG

gmx-word-counter

Version:

Fast, GMX-V compliant word and character counter. Can count both logographic and non-logographic languages correctly. Also supports generic counting for cases when language is unknown.

11 lines (10 loc) 227 B
export type Counts = { characters: number; whiteSpace: number; punctuation: number; }; /** * * @param {string} text - text to count characters in */ export declare function countCharacters(text: string): Counts;