let
nameListCelebritiesIds =
celebritiesInNameList.
map(
c
=> {
return
c.
id;
});
let
selectableCelebrities =
celebrities.
filter(
c
=> {
return
nameListCelebritiesIds.
indexOf(
c.
id) <
0;
});
let
names =
celebrities.
map(
c
=>
c.
name);
function
checkNameExistInNames(
name:
string) {
for (
let
n
of
names) {
if (
n ===
name) {
return
true;
}
}
return
false;
}
if (!
showAll) {
tracklets =
tracklets.
filter(
t
=> {
return
checkNameExistInNames(
t.
title);
});
}
else {
}