2022-09-01 14:51:18 +01:00
|
|
|
export const testers = {
|
2023-02-12 07:40:49 +00:00
|
|
|
"twitter": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length < 20)
|
|
|
|
|| (patternMatch["spaceId"] && patternMatch["spaceId"].length === 13),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-02-12 07:40:49 +00:00
|
|
|
"vk": (patternMatch) => (patternMatch["userId"] && patternMatch["videoId"]
|
2023-04-29 16:30:59 +01:00
|
|
|
&& patternMatch["userId"].length <= 10 && patternMatch["videoId"].length <= 10),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-04-24 20:01:25 +01:00
|
|
|
"bilibili": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length <= 12),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-04-24 20:01:25 +01:00
|
|
|
"youtube": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length <= 11),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-02-12 07:40:49 +00:00
|
|
|
"reddit": (patternMatch) => (patternMatch["sub"] && patternMatch["id"] && patternMatch["title"]
|
|
|
|
&& patternMatch["sub"].length <= 22 && patternMatch["id"].length <= 10 && patternMatch["title"].length <= 96),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-02-12 07:40:49 +00:00
|
|
|
"tiktok": (patternMatch) => ((patternMatch["user"] && patternMatch["postId"] && patternMatch["postId"].length <= 21)
|
|
|
|
|| (patternMatch["id"] && patternMatch["id"].length <= 13)),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-02-12 07:40:49 +00:00
|
|
|
"douyin": (patternMatch) => ((patternMatch["postId"] && patternMatch["postId"].length <= 21)
|
|
|
|
|| (patternMatch["id"] && patternMatch["id"].length <= 13)),
|
2022-08-04 12:22:40 +01:00
|
|
|
|
2023-02-12 07:40:49 +00:00
|
|
|
"tumblr": (patternMatch) => ((patternMatch["id"] && patternMatch["id"].length < 21)
|
|
|
|
|| (patternMatch["id"] && patternMatch["id"].length < 21 && patternMatch["user"] && patternMatch["user"].length <= 32)),
|
2022-08-13 12:14:09 +01:00
|
|
|
|
|
|
|
"vimeo": (patternMatch) => ((patternMatch["id"] && patternMatch["id"].length <= 11)),
|
2022-08-22 15:10:54 +01:00
|
|
|
|
2023-08-07 15:50:15 +01:00
|
|
|
"soundcloud": (patternMatch) => (patternMatch["author"]?.length <= 25 && patternMatch["song"]?.length <= 255)
|
|
|
|
|| (patternMatch["shortLink"] && patternMatch["shortLink"].length <= 32),
|
2023-04-24 20:01:25 +01:00
|
|
|
|
2023-04-29 17:26:49 +01:00
|
|
|
"instagram": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length <= 12),
|
|
|
|
|
2023-05-24 18:32:41 +01:00
|
|
|
"vine": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length <= 12),
|
|
|
|
|
2023-08-19 17:42:10 +01:00
|
|
|
"pinterest": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length <= 128),
|
|
|
|
|
2023-08-19 18:58:01 +01:00
|
|
|
"streamable": (patternMatch) => (patternMatch["id"] && patternMatch["id"].length === 6)
|
2023-02-12 07:40:49 +00:00
|
|
|
}
|