1.2.0 • Published 1 month ago

@universal-packages/express-controllers-parameters v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Express controllers parameters

npm version Testing codecov

Express parameters for universal controllers.

Install

npm install @universal-packages/express-controllers-parameters

npm install express
npm install @universal-packages/express-controllers

Global middleware

By installing this package a global middleware is going to be loaded automatically by the ExpressControllers.

Global methods

setUnionKind(unionKind: string)

Set up the global middleware parameters union kind by calling this function at any given moment.

import { setUnionKind } from '@universal-packages/express-controllers-parameters'

setUnionKind('join')

Hooks

@UseParameters([unionKind: string])

Optionally you can set a different strategy for a particular action using this decorator.

import { BaseController, Controller, Get, Post } from '@universal-packages/express-controllers'
import { UseParameters } from '@universal-packages/express-controllers-parameters'

@Controller('good')
export default class GoodController extends BaseController {
  @Get()
  @UseParameters('separate')
  async action() {
    this.request.parameters
  }
}

Typescript

This library is developed in TypeScript and shipped fully typed.

Contributing

The development of this library happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving this library.

License

MIT licensed.

1.2.0

1 month ago

1.1.19

2 months ago

1.1.18

2 months ago

1.1.17

2 months ago

1.1.16

2 months ago

1.1.15

2 months ago

1.1.14

2 months ago

1.1.12

2 months ago

1.1.13

2 months ago

1.1.11

3 months ago

1.1.10

3 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

8 months ago

1.1.6

8 months ago

1.1.5

10 months ago

1.1.4

11 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago