nestjs-telegraf/sample/common/pipes/reverse-text.pipe.ts
2021-01-03 01:30:57 +03:00

9 lines
221 B
TypeScript

import { Injectable, PipeTransform } from '@nestjs/common';
@Injectable()
export class ReverseTextPipe implements PipeTransform {
transform(value: string): string {
return value.split('').reverse().join('');
}
}