@homegrown/word-counter
Version:
word counter which support CJK and emoji
11 lines (10 loc) • 401 B
TypeScript
export interface IWordCountResult {
words: number;
lines: number;
characters: number;
charactersWithSpaces: number;
}
export declare const countWords: (text: string) => number;
export declare const countLines: (text: string) => number;
export declare const countCharacters: (text: string, withSpace?: boolean) => number;
export declare const count: (text: string) => IWordCountResult;