Network Processor Module

    nestjs-custom-decorators-decorators

    1.1.0 • Public • Published

    Nestjs-custom-decorators

    A set of nestjs custom decorators.

    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() userany)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() decodedJwtany)void {
       return decodedJwt;
     }
     

    Install

    npm i nestjs-custom-decorators-decorators

    DownloadsWeekly Downloads

    1

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    2.42 kB

    Total Files

    3

    Last publish

    Collaborators

    • algoanbot