mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 23:34:10 +08:00
chore: more work on benchmarks
This commit is contained in:
@@ -61,14 +61,7 @@ export class QuestionBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper: Count items matching a predicate
|
||||
*/
|
||||
export function countByPredicate<T>(items: T[], predicate: (item: T) => boolean): number {
|
||||
return items.filter(predicate).length
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper: Rotate through question generators
|
||||
* Rotate through question generators
|
||||
*/
|
||||
export function rotateQuestions<T>(
|
||||
items: T[],
|
||||
|
||||
Reference in New Issue
Block a user