mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Show both categories and chapter names in hover text
This commit is contained in:
6
src/utils/arrayUtils.ts
Normal file
6
src/utils/arrayUtils.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export function partition<T>(array: T[], filter: (element: T) => boolean): [T[], T[]] {
|
||||
const pass = [], fail = [];
|
||||
array.forEach((element) => (filter(element) ? pass : fail).push(element));
|
||||
|
||||
return [pass, fail];
|
||||
}
|
||||
Reference in New Issue
Block a user