nestjs-telegraf/sample/common/pipes/reverse-text.pipe.ts

9 lines
221 B
TypeScript
Raw Normal View History

2021-01-03 01:30:57 +03:00
import { Injectable, PipeTransform } from '@nestjs/common';
@Injectable()
export class ReverseTextPipe implements PipeTransform {
transform(value: string): string {
return value.split('').reverse().join('');
}
}