import { uniqBy , differenceBy } from 'lodash-es' ; import { ajax } from '@/utils' ; import { VtbInfo } from '@/models' ; import { VUP_BAN_LIST } from '@/db' ; author CaoMeiYouRen
 *  date returns export async function getVupAndVtuberList ( limit = 20 ) { let list = [ ] ; const url = 'https://api.vtbs.moe/v1/info' ; const result = await ajax ( url ) ; list = list . concat ( result . data ) ; list = uniqBy ( list , ( e ) => e . mid ) ; list = list . sort ( ( a , b ) => b . follower - a . follower ) ; list = list . filter ( ( e ) => ! /hololive/i . test ( e . sign ) ) ; list = differenceBy ( list , VUP_BAN_LIST , ( e ) => e . mid ) ; list = list . slice ( 0 , limit ) ; return list ; }