Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xpress-mongo

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xpress-mongo - npm Package Compare versions

Comparing version 2.5.1 to 2.6.0

2

package.json
{
"name": "xpress-mongo",
"version": "2.5.1",
"version": "2.6.0",
"description": "Light Weight ODM for mongoDb NodeJs",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -38,2 +38,7 @@ import XMongoModel from "./XMongoModel";

/**
* Alias of .model but to link model classes
* @param model
*/
linkModel<T extends typeof XMongoModel>(model: T): this;
/**
* Creates a model using current connection

@@ -40,0 +45,0 @@ * @param collection

@@ -100,2 +100,12 @@ "use strict";

/**
* Alias of .model but to link model classes
* @param model
*/
linkModel(model) {
const collectionName = model.collectionName;
if (!collectionName)
throw new Error(`Collection name is not defined in model ${model.name}`);
return this.link(model, collectionName);
}
/**
* Creates a model using current connection

@@ -102,0 +112,0 @@ * @param collection

@@ -78,2 +78,6 @@ import ObjectCollection from "object-collection";

/**
* Model Collection Name
*/
static collectionName: string;
/**
* Model Constructor

@@ -80,0 +84,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