# egg-shell-decorators-plus

> ```ts import { Controller } from 'egg'; import { Get, Middleware } from 'egg-shell-decorators'; import JwtValidator from '../middleware/jwt-validator';

Latest version **0.2.3** (published 2020-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install egg-shell-decorators-plus
pnpm add egg-shell-decorators-plus
yarn add egg-shell-decorators-plus
bun add egg-shell-decorators-plus
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2020-10-13 |
| First published | 2020-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | @serializedowen |
| Maintainers | serializedowen |

## Links

- npm: https://www.npmjs.com/package/egg-shell-decorators-plus
- Repository: git@github.com:serializedowen/egg-shell-decorators
- npm.io page: https://npm.io/package/egg-shell-decorators-plus

## Dependencies (5)

- [express](https://npm.io/package/express.md) ^4.16.3
- [class-validator](https://npm.io/package/class-validator.md) ^0.12.2
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.12
- [class-transformer](https://npm.io/package/class-transformer.md) ^0.3.1
- [babel-plugin-transform-decorators-legacy](https://npm.io/package/babel-plugin-transform-decorators-legacy.md) ^1.3.5

## Recent versions

- 0.2.3 (latest) — 2020-10-13
- 0.2.2 — 2020-10-12
- 0.2.1 — 2020-10-12
- 0.2.0 — 2020-10-10
- 0.1.0 — 2020-09-01
- 0.0.1 — 2020-08-31

## README

<img width="100" src="https://super-github.oss-cn-shenzhen.aliyuncs.com/package/egg-shell-decorators.png"/>

<p>
  <img src="https://img.shields.io/badge/version-1.5.0-ff69b4.svg"/>
  <img src="https://img.shields.io/packagist/l/doctrine/orm.svg"/>
</p>

> 蛋壳\~给你的Egg加个壳\~（该项目本人会持续维护，欢迎大家提Issues和加入微信群~）

# 快速开始
```ts
import { Controller } from 'egg';
import { Get, Middleware } from 'egg-shell-decorators';
import JwtValidator from '../middleware/jwt-validator';

export default class UserController extends Controller {

  @Get('/')
  @Middleware([ JwtValidator() ])
  public getUser() {
    this.ctx.body = { name: 'super2god' };
  }

}
```

# 版本
| 版本 | 文档 | 上线时间 |
| ---- | ---- | ----  |
| v1.5.0 | [点击跳转](https://www.yuque.com/super2god/open-source/egg-shell-decorators-v1.5.0) | 2020-07-28 |
| v1.5.0-beta | [点击跳转](https://www.yuque.com/super2god/open-source/egg-shell-decorators-v1.5.0-beta) | 2020-07-13 |
| v1.0.7 | [点击跳转](https://www.yuque.com/super2god/open-source/egg-shell-decorators-v1.0.7) | 2018-12-29 |

# 示例代码
蛋壳示例代码请查看该项目：[egg-shell-example](https://github.com/super2god/egg-shell-example)（蛋壳示例代码）。

```ts
import { Controller } from 'egg';
import { Get, Post } from 'egg-shell-decorators';

export default class UserController extends Controller {

  @Get('/:id')
  public getUser({ params: { id } }) {
    this.ctx.body = `getUser:${id}`;
  }

  @Post('/')
  public createUser({ request: { body: { name, phone, age } } }) {
    this.ctx.body = { name, phone, age };
  }
}
```

# 加入小组来面基~
由于本人很少上QQ，所以建的是微信群，而微信群码很快就失效，所以想进交流群的小伙伴加我微信噢\~~我拉你进群，欢迎大佬们加入☺️

<img width="300" src="https://super-github.oss-cn-shenzhen.aliyuncs.com/common/wxqrcode.jpeg"/>

---
_Source: https://npm.io/package/egg-shell-decorators-plus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
