New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.9.0 to 2.9.1

2

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

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

@@ -165,3 +165,3 @@ import ObjectCollection from "object-collection";

*/
static make<T extends typeof XMongoModel>(this: T, data: StringToAnyObject): InstanceType<T>;
static make<T extends typeof XMongoModel>(this: T, data?: StringToAnyObject): InstanceType<T>;
/**

@@ -179,2 +179,3 @@ * Check if id is a valid id

private $setOriginal;
private $appendData;
/**

@@ -181,0 +182,0 @@ * Set multiple schemas and use them at anytime using `.setSchema`

@@ -236,4 +236,4 @@ "use strict";

*/
static make(data) {
return new this().set(data);
static make(data = {}) {
return new this().set(data).$appendData();
}

@@ -275,2 +275,16 @@ /**

}
$appendData(append) {
// Get Append
if (!append)
append = this.$static().append;
// If append then run append functions
if (append) {
for (const key of append) {
if (typeof this[key] === "function") {
this.set(key, this[key]());
}
}
}
return this;
}
/**

@@ -425,3 +439,3 @@ * Set multiple schemas and use them at anytime using `.setSchema`

// @ts-ignore
const append = this.constructor.append || [];
const append = this.$static().append || [];
const excluded = [...append, ...this.loadedRelationships];

@@ -1283,14 +1297,3 @@ for (const key in changes) {

this.set(data);
// Get Append
if (!append)
append = this.$static().append;
// If append then run append functions
if (append) {
for (const key of append) {
if (typeof this[key] === "function") {
this.set(key, this[key]());
}
}
}
return this;
return this.$appendData(append);
}

@@ -1297,0 +1300,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