Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 343 Bytes
import { Pipe, PipeTransform } from '@angular/core';
import { isString } from '../utils/utils';
@Pipe({
name: 'reverseStr'
})
export class ReverseStrPipe implements PipeTransform {
transform(input: string): string {
if (!isString(input)) {
return input;
}
return Array.from(input).reverse().join('');
}
}
You can’t perform that action at this time.