Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

nest js null exclude


import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

@Injectable()
export class ExcludeNullInterceptor implements NestInterceptor {
  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
    return next
      .handle()
      .pipe(map(value => value === null ? '' : value ));
  }
}
Comment

PREVIOUS NEXT
Code Example
Typescript :: from how many ways we can define props with typescript react 
Typescript :: shortid typescript 
Typescript :: inno add exe in service 
Typescript :: class validator array of enum 
Typescript :: react native paper 
Typescript :: typescript use object keys as index 
Typescript :: does any event get triggered when checked value changes programatically? 
Typescript :: ts async function type 
Typescript :: ionic 5 check if string can be a number and then make a number 
Typescript :: websockets socketio flask 
Typescript :: change field name relation typeorm 
Typescript :: format time to am pm 
Typescript :: typescript type specific numbers 
Typescript :: stackoverflow ngbdate angular 
Typescript :: Scripts may close only the windows that were opened by them 
Typescript :: get enum value dynamically typescript 
Typescript :: int sum. 
Typescript :: cubic beziere curve function 
Typescript :: ts enum 
Typescript :: typescript require not defined 
Typescript :: convert javascript to typescript 
Typescript :: laravel row exists or null 
Typescript :: Can only use lower 16 bits for requestCode registerForActivityResult 
Typescript :: Count by One Variable 
Typescript :: what is use hsts in .net core 
Typescript :: get-dirstats not recognized 
Typescript :: kotlin version that is used for building with gradle 
Typescript :: typescript checkbox object is possibly null 
Typescript :: angular JSON.parse (<anonymous) 
Typescript :: ____________ determines the time spent in various parts of the unit. 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =