UseTokenCountReturn
Defined in: react-hooks/src/use-token-count.ts:28
Token count return value.
Properties
Section titled “Properties”characterCount
Section titled “characterCount”characterCount:
number
Defined in: react-hooks/src/use-token-count.ts:32
Characters count
countTokens()
Section titled “countTokens()”countTokens: (
text) =>number
Defined in: react-hooks/src/use-token-count.ts:38
Count tokens for text
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
isEstimating
Section titled “isEstimating”isEstimating:
boolean
Defined in: react-hooks/src/use-token-count.ts:36
Whether estimation is in progress
tokenCount
Section titled “tokenCount”tokenCount:
number
Defined in: react-hooks/src/use-token-count.ts:30
Estimated token count
wordCount
Section titled “wordCount”wordCount:
number
Defined in: react-hooks/src/use-token-count.ts:34
Word count