Network Processor Module

    @algoan/nestjs-custom-decorators
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.4 • Public • Published

    Nestjs-custom-decorators

    A set of nestjs custom decorators.

    Installation

    npm install --save @algoan/nestjs-custom-decoratos

    User decorator

    A param decorator that fetches the request.user (could be added by a middleware or a guard) and add it to the params.

    Usage:

     @Get('/user')
     public getUser(@User() user: any): void {
       return user;
     }

    DecodeJWT

    A param decorator that decodes the JSON web token added to the request by a middleware or a guard and add it to the params.

    Usage:

     @Get('/decode-jwt')
     public getDecodedJWT(@DecodeJWT() decodedJwt: any): void {
       return decodedJwt;
     }

    Install

    npm i @algoan/nestjs-custom-decorators

    DownloadsWeekly Downloads

    234

    Version

    1.3.4

    License

    ISC

    Unpacked Size

    7.42 kB

    Total Files

    9

    Last publish

    Collaborators

    • algoanbot
    • fabong
    • na-ji