mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
fix torrents filter
This commit is contained in:
@@ -32,6 +32,7 @@ export const isToday = (date: Date) => {
|
||||
)
|
||||
}
|
||||
|
||||
// 计算时间差,返回xx天xx小时xx分钟
|
||||
export const calculateTimeDifference = (inputTime: string): string => {
|
||||
|
||||
if (!inputTime) {
|
||||
@@ -57,3 +58,13 @@ export const calculateTimeDifference = (inputTime: string): string => {
|
||||
return `${days}天`;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断一个数组subArray是不是在另一个数组mainArray中
|
||||
export const isContained = (subArray: any[], mainArray: any[]): boolean => {
|
||||
return subArray.every(element => mainArray.includes(element));
|
||||
}
|
||||
|
||||
// 判断两个数组是否存在交集
|
||||
export const isIntersected = (array1: any[], array2: any[]): boolean => {
|
||||
return array1.some(element => array2.includes(element));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user