countWords
Function Stability: stable
Number of words in a text (the default WordCounter of Nabu).
Signature
TypeScript
import { countWords } from '@aionbuilders/nabu';TypeScript
function countWords(text: string, lang?: string): numberParameters
| Parameter | Type | Description |
|---|---|---|
text | string | n/a |
langoptional | string | BCP 47 tag of the text (the editor's |
Returns
number
Source: src/lib/utils/words.js:77