New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-plugin-autoinc-fix

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-plugin-autoinc-fix - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "mongoose-plugin-autoinc-fix",
"version": "1.2.0",
"version": "1.2.1",
"description": "==fix-bug==This plugin allows you to auto-increment any field on any mongoose schema that you wish (forked mongoose-auto-increment in 2018).",

@@ -5,0 +5,0 @@ "files": [

@@ -1,2 +0,2 @@

# mongoose-plugin-autoinc
# mongoose-plugin-autoinc-fix
[![](https://img.shields.io/npm/v/mongoose-plugin-autoinc.svg)](https://www.npmjs.com/package/mongoose-plugin-autoinc)

@@ -27,4 +27,6 @@ [![codecov coverage](https://img.shields.io/codecov/c/github/nodkz/mongoose-plugin-autoinc.svg)](https://codecov.io/github/nodkz/mongoose-plugin-autoinc)

> npm install mongoose-plugin-autoinc
> npm install mongoose-plugin-autoinc-fix
> yarn add mongoose-plugin-autoinc-fix
Once you have the plugin installed it is very simple to use. Just pass `autoIncrement` to the `plugin()` function on your schema.

@@ -36,5 +38,5 @@

import mongoose from 'mongoose';
import { autoIncrement } from 'mongoose-plugin-autoinc';
import { autoIncrement } from 'mongoose-plugin-autoinc-fix';
const connection = mongoose.createConnection("mongodb://localhost/myDatabase");
mongoose.connect("mongodb://localhost/myDatabase");

@@ -49,3 +51,3 @@ const BookSchema = new mongoose.Schema({

BookSchema.plugin(autoIncrement, 'Book');
const Book = connection.model('Book', BookSchema);
const Book = mongoose.model('Book', BookSchema);
````

@@ -52,0 +54,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc