Comparing version 1.4.6 to 1.4.7
{ | ||
"name": "mongot", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "MongoT is a modern ODM library for MongoDb.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -29,2 +29,3 @@ import { SchemaMutate } from './metadata/mutation'; | ||
toJSON(): any; | ||
clone(): this; | ||
extract(): any; | ||
@@ -31,0 +32,0 @@ static factory<T extends SchemaMetadata>(document?: Object): T; |
@@ -244,2 +244,10 @@ "use strict"; | ||
} | ||
clone() { | ||
const cloned = this.toObject(); | ||
if (cloned._id) { | ||
delete cloned._id; | ||
} | ||
const constructor = this.constructor; | ||
return new constructor().__mutate(cloned); | ||
} | ||
extract() { | ||
@@ -246,0 +254,0 @@ const properties = []; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
136971
1945