We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getAllTokens()
count
1 parent 4107be2 commit 4debb5eCopy full SHA for 4debb5e
apps/oxlint/src-js/plugins/tokens.ts
@@ -399,7 +399,7 @@ export function getTokens(
399
sliceEnd = min(sliceEnd + afterCount, tokensLength);
400
401
if (typeof filter !== "function") {
402
- return tokenList.slice(sliceStart, sliceEnd);
+ return tokenList.slice(sliceStart, min(sliceStart + (count ?? sliceEnd), sliceEnd));
403
}
404
405
const allTokens: Token[] = [];
0 commit comments