transactions-mongoose
Advanced tools
Comparing version 1.2.4 to 1.2.5
{ | ||
"name": "transactions-mongoose", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "Transactions for mongoose", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,2 +6,3 @@ # 🇺🇦 Transactions for mongoose | ||
[![Downloads/month](https://img.shields.io/npm/dm/transactions-mongoose.svg)](http://www.npmtrends.com/transactions-mongoose) | ||
[![Vulnerabilities](https://snyk.io/test/npm/transactions-mongoose/badge.svg)](https://snyk.io/test/npm/transactions-mongoose) | ||
@@ -8,0 +9,0 @@ **Transactions allow you to perform multiple group operations in isolation and undo all operations if one of them fails.** |
@@ -13,3 +13,3 @@ /* | ||
* type?: object, required?: boolean, unique?: boolean, index?: boolean, min: number, max: number, | ||
* validate?:{validator: function, message?: string}} | ||
* validate?:{validator: function, message?: string}}} | ||
*/ | ||
@@ -205,3 +205,3 @@ const SchemaConstructor = {} | ||
DOCUMENT = 'Document' | ||
#excludeUpdateFields = ['_id', 'id', 'tableData']; | ||
/** | ||
@@ -315,2 +315,3 @@ * @type {[string]} | ||
if (data.constructor.name === this.OBJECT) { | ||
this.#excludeUpdateFields.map(it => delete data[it]); | ||
for (let k of Object.keys(data)) this.document[k] = data[k]; | ||
@@ -317,0 +318,0 @@ this.#collectUniques() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71726
1230
193