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

mongot

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongot - npm Package Compare versions

Comparing version 1.4.12 to 1.4.13

2

package.json
{
"name": "mongot",
"version": "1.4.12",
"version": "1.4.13",
"description": "MongoT is a modern ODM library for MongoDb.",

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

@@ -25,2 +25,17 @@ "use strict";

return new schema_1.ObjectID(value);
case schema_1.Long:
if (value instanceof schema_1.Long) {
return value;
}
if (typeof value === 'number') {
return schema_1.Long.fromNumber(value);
}
else if (typeof value === 'string') {
return schema_1.Long.fromString(value);
}
else if (typeof value === 'object' && '_bsontype' in value) {
return schema_1.Long.fromBits(value['low_'], value['high_']);
}
// @TODO Think how to do with that unexpected behavior
return null;
case String:

@@ -55,2 +70,5 @@ return TypeCast.castToString(value);

}
if (value instanceof schema_1.Long) {
return value.toJSON();
}
if (value instanceof SchemaMetadata) {

@@ -83,2 +101,5 @@ return value.toObject();

}
if (value instanceof schema_1.ObjectID || value instanceof schema_1.Long) {
return value;
}
if (value instanceof SchemaMetadata) {

@@ -85,0 +106,0 @@ return value.extract();

@@ -33,2 +33,2 @@ import "./reflect";

export declare const virtual: (target: any, propertyKey: string | symbol) => void;
export { ObjectID } from 'mongodb';
export { ObjectID, Long } from 'mongodb';

@@ -110,2 +110,3 @@ "use strict";

exports.ObjectID = mongodb_1.ObjectID;
exports.Long = mongodb_1.Long;
//# sourceMappingURL=schema.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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