sma

simple-mongoose-autoincrement

Mongoose plugin for auto-increment number ID and given field name.

Showing:

Popularity

Downloads/wk

16

GitHub Stars

5

Maintenance

Last Commit

5yrs ago

Contributors

2

Package

Dependencies

2

Size (min+gzip)

30.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Reviews

Top Feedback

1Hard to Use

Readme

Mongoose Auto-Increment

Mongoose plugin for auto-increment number ID and given field name.

Install

npm install --save simple-mongoose-autoincrement

#####or

yarn add simple-mongoose-autoincrement

Usage

// Using with global.
var mongoose = require('mongoose');
var autoincrement = require('simple-mongoose-autoincrement');

mongoose.plugin(autoincrement, {/*no field name*/});
// Using with a model and option.
var mongoose = require('mongoose');
var autoincrement = require('simple-mongoose-autoincrement');
var sampleSchema = mongoose.Schema({
  data: String
});
sampleSchema.plugin(autoincrement, {field: 'sequnece' /*with field name*/});

###If you need more informations see test.js

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use1
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Blue edgemars14 Ratings1 Review
"Its stupid to add quotes in your bio" ~ me
September 19, 2020
Hard to Use