mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: perf
This commit is contained in:
1 parent
df8b32b7cd
commit
a57734cdee
6 files changed
+225
-158
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { TankopediaFilters } from '../../stores/tankopediaFilters';
|
||||
import { TankDefinition } from './tankDefinitions';
|
||||
|
||||
export function tankopediaFilterTank(
|
||||
filters: TankopediaFilters,
|
||||
tank: TankDefinition,
|
||||
) {
|
||||
return (
|
||||
(filters.tier === undefined || filters.tier === tank.tier) &&
|
||||
(filters.nation === undefined || filters.nation === tank.nation) &&
|
||||
(filters.class === undefined || filters.class === tank.class) &&
|
||||
(filters.type === undefined || filters.type === tank.treeType) &&
|
||||
(filters.testing === 'include' ||
|
||||
(filters.testing === 'only' && tank.testing) ||
|
||||
(filters.testing === 'exclude' && !tank.testing))
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user