MCPcopy Create free account
hub / github.com/UI5/webcomponents / getTokensCountText

Function getTokensCountText

packages/main/src/Tokenizer.ts:1342–1353  ·  view source on GitHub ↗
(iTokenCount: number)

Source from the content-addressed store, hash-verified

1340}
1341
1342const getTokensCountText = (iTokenCount: number) => {
1343 const tokenCountMap: TokenCountMapType = {
1344 0: TOKENIZER_ARIA_CONTAIN_TOKEN,
1345 1: TOKENIZER_ARIA_CONTAIN_ONE_TOKEN,
1346 };
1347
1348 if (iTokenCount in tokenCountMap) {
1349 return Tokenizer.i18nBundle.getText(tokenCountMap[iTokenCount]);
1350 }
1351
1352 return Tokenizer.i18nBundle.getText(TOKENIZER_ARIA_CONTAIN_SEVERAL_TOKENS, iTokenCount);
1353};
1354
1355Tokenizer.define();
1356

Callers 2

_tokensCountTextMethod · 0.85
_tokensCountTextMethod · 0.85

Calls 1

getTextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…