Prettify generic scraper symbols (#34)
parent
bb2cd1c85a
commit
6c7adb6193
@ -0,0 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { SymbolPipe } from './symbol.pipe';
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [SymbolPipe],
|
||||
exports: [SymbolPipe],
|
||||
providers: []
|
||||
})
|
||||
export class GfSymbolModule {}
|
@ -0,0 +1,11 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { ghostfolioScraperApiSymbolPrefix } from '@ghostfolio/helper';
|
||||
|
||||
@Pipe({ name: 'gfSymbol' })
|
||||
export class SymbolPipe implements PipeTransform {
|
||||
public constructor() {}
|
||||
|
||||
public transform(aSymbol: string): string {
|
||||
return aSymbol?.replace(ghostfolioScraperApiSymbolPrefix, '');
|
||||
}
|
||||
}
|
Loading…
Reference in new issue