[frontend] Add twitter-corpses pipe
This commit is contained in:
parent
444b38e0e5
commit
5cf06a647f
|
@ -10,6 +10,7 @@ import { TelegramInfoDialogComponent } from './telegram/telegram-info-dialog/tel
|
|||
import { TelegramDialogComponent } from './telegram/telegram-dialog/telegram-dialog.component';
|
||||
import { TwitterInfoDialogComponent } from './twitter/twitter-info-dialog/twitter-info-dialog.component';
|
||||
import { TwitterCallbackComponent } from './twitter/twitter-callback/twitter-callback.component';
|
||||
import { TwitterCorpsesPipe } from './twitter/twitter-corpses-pipe/twitter-corpses.pipe';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
|
@ -22,6 +23,7 @@ import { TwitterCallbackComponent } from './twitter/twitter-callback/twitter-cal
|
|||
TelegramDialogComponent,
|
||||
TwitterInfoDialogComponent,
|
||||
TwitterCallbackComponent,
|
||||
TwitterCorpsesPipe,
|
||||
],
|
||||
imports: [CommonModule, SharedModule],
|
||||
exports: [
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'twitterCorpses',
|
||||
})
|
||||
export class TwitterCorpsesPipe implements PipeTransform {
|
||||
transform(twitters) {
|
||||
return twitters.filter((x) => x.verified === 1);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue