# avilatek-mongoose-autoincrement

> This repo is based of [chevtek/mongoose-auto-increment](https://github.com/chevtek/mongoose-auto-increment) we take the code update it!

Latest version **1.0.1** (published 2022-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install avilatek-mongoose-autoincrement
pnpm add avilatek-mongoose-autoincrement
yarn add avilatek-mongoose-autoincrement
bun add avilatek-mongoose-autoincrement
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-11-10 |
| First published | 2022-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 66.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jose Roberto Quevedo Gabizon |
| Maintainers | zoomelectrico |

## Links

- npm: https://www.npmjs.com/package/avilatek-mongoose-autoincrement
- npm.io page: https://npm.io/package/avilatek-mongoose-autoincrement

## Dependencies (1)

- [extend](https://npm.io/package/extend.md) ^3.0.2

## Recent versions

- 1.0.1 (latest) — 2022-11-10

## README

# Mongoose Auto Increment

This repo is based of [chevtek/mongoose-auto-increment](https://github.com/chevtek/mongoose-auto-increment) we take the code update it!

The usage is as simple as this:

```ts
import mongoose from 'mongoose';
import { plugin, initialize } from 'avilatek-mongoose-autoincrement';

initialize(mongoose.createConnection('mongodb://localhost/myDatabase'));

const bookSchema = new mongoose.Schema({
  author: { type: Schema.Types.ObjectId, ref: 'Author' },
  title: String,
  genre: String,
  publishDate: Date,
});

bookSchema.plugin(plugin, 'Book');
const Book = mongoose.model('Book', bookSchema);
```

## Docs

> Under construction

## Credits

- TSDX
- mongoose-auto-increment

## Author

- Jose Roberto Quevedo <jose@avilatek.com>

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