Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 707 Bytes

README.md

File metadata and controls

36 lines (22 loc) · 707 Bytes

DSi-Mongoose-Auto-Increment

NPM version

Mongoose plugin for auto-increment number ID.

Install

npm install --save dsi-mongoose-auto-increment

Usage

var mongoose = require('mongoose');
var dincrement = require('dsi-mongoose-auto-increment');

//for global:
mongoose.plugin(dincrement);

//for individual model:
CustomSchema.plugin(dincrement);

//for custom property in your model:
CustomSchema.plugin(dincrement, {column: '_ColumnName_'});

License

ISC © [Mushraful Hoque Anik]