# baucis-decorator-reserved

> Prevents clients from setting or updating properties with `reserved` option enabled.

Latest version **1.0.1** (published 2015-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install baucis-decorator-reserved
pnpm add baucis-decorator-reserved
yarn add baucis-decorator-reserved
bun add baucis-decorator-reserved
```

## 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.1 |
| Published | 2015-06-05 |
| First published | 2015-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | timbur |
| Maintainers | timbur |
| Keywords | baucis, decorator, reserved, resource |

## Links

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

## Dependencies (2)

- [baucis](https://npm.io/package/baucis.md) ^1.3.1
- [baucis-decorators](https://npm.io/package/baucis-decorators.md) ^1.0.0

## 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.1 (latest) — 2015-06-05
- 1.0.0 — 2015-06-03

## README

# baucis-decorator-reserved
Prevents clients from setting or updating properties with `reserved` option enabled.

## Install
```
npm install baucis-decorators baucis-decorator-reserved --save
```

## Usage
Add the decorator and it will add the functionality to any properties containing a `reserved` field set to `true`.

## Example
`controllers/Resource.js`
```js
var baucis = require('baucis');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = Schema.Types.ObjectId;

var ResourceProps = {};

ResourceProps.created = {
  type: Date,
  default: Date.now,
  required: true,
  reserved: true
};

var ResourceSchema = new Schema(ResourceProps);
var ResourceModel = mongoose.model('Resource', ResourceSchema);
var ResourceController = baucis.rest('Resource');

var decorators = require('baucis-decorators');
decorators.add.call(ResourceController, [
  'baucis-decorator-reserved'
]);

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

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