Skip to content

nestjs-custom-decorators 1.3.13

Install from the command line:
Learn more about npm packages
$ npm install @algoan/nestjs-custom-decorators@1.3.13
Install via package.json:
"@algoan/nestjs-custom-decorators": "1.3.13"

About this version

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;
 }

Details


Assets

  • nestjs-custom-decorators-1.3.13.tgz

Download activity

  • Total downloads 2,046
  • Last 30 days 137
  • Last week 30
  • Today 0

Recent versions

View all