Rabin R

Developer Showcase

A look under the hood — interactive code snippets, an API explorer, the architecture map, quality metrics, dependencies and recent git activity behind this portfolio.

typescript

A reusable async pipe for handling promises and observables with automatic cleanup.

import { Pipe, PipeTransform } from '@angular/core';
import { Observable } from 'rxjs';

@Pipe({
  name: 'async',
  standalone: true
})
export class AsyncPipe implements PipeTransform {
  transform(value: Observable<any> | Promise<any>): any {
    if (value instanceof Observable) {
      return value.toPromise();
    }
    return value;
  }
}
Transforms async values in templates

Want to see this applied to your product?

Explore the projects or start a conversation.