# baucis-decorators

> Some helper methods for decorating `baucis` controllers. Controllers can inherit decorators from other controllers.

Latest version **1.0.3** (published 2015-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install baucis-decorators
pnpm add baucis-decorators
yarn add baucis-decorators
bun add baucis-decorators
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-07-06 |
| First published | 2015-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | timbur |
| Maintainers | timbur |
| Keywords | baucis, decorators, resource, controllers |

## Links

- npm: https://www.npmjs.com/package/baucis-decorators
- Repository: https://github.com/loggur/baucis-decorators
- Homepage: https://github.com/loggur/baucis-decorators#readme
- Issues: https://github.com/loggur/baucis-decorators/issues
- npm.io page: https://npm.io/package/baucis-decorators

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-07-06
- 1.0.2 — 2015-06-05
- 1.0.1 — 2015-06-03
- 1.0.0 — 2015-06-02

## README

# baucis-decorators
Some helper methods for decorating [`baucis`](https://github.com/wprl/baucis) controllers.  Controllers can inherit decorators from other controllers.

## Usage
Use `npm install baucis-decorators --save` along with any decorators you'd like to use.  See [this query](https://github.com/loggur?query=baucis-decorator-) for Loggur's current list.

## Quick Example
`controllers/User.js`
```js
var baucis = require('baucis');
var decorators = require('baucis-decorators');
var doSomething = require('baucis-decorator-do-something');

// `UserController` will inherit `ResourceController`'s decorators
var ResourceController = require('../controllers/Resource.js');

// ensure model is initialized
var UserModel = require('../models/User.js');

// create REST endpoint using `baucis`
var UserController = baucis.rest('User');

// decorate controller
decorators.add.call(UserController, [
  doSomething,
  ResourceController
]);

/** Alternatively use a string and omit the above `require` statement:
decorators.add.call(UserController, [
  'baucis-decorator-do-something',
  ResourceController
]);
 **/

/**
 * Expose controller.
 */
module.exports = UserController;
```

## Detailed Example
See [`baucis-decorators-example`](https://github.com/loggur/baucis-decorators-example).  Use as many decorators as you want.  A handful of decorators depend on other decorators.

## Decorators List
For now, see [this query](https://github.com/loggur?query=baucis-decorator-).  Submit a pull request if you'd like to add decorators of your own to this README.

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