Socket
Socket
Sign inDemoInstall

@andrewscwei/mongodb-odm

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andrewscwei/mongodb-odm - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

4

build/types/index.d.ts

@@ -405,3 +405,3 @@ import { CollectionAggregationOptions, CollectionInsertManyOptions, CollectionInsertOneOptions, CommonOptions, FilterQuery, FindOneAndReplaceOption, IndexOptions, ObjectID, ReplaceOneOptions, UpdateQuery } from 'mongodb';

/**
* Checks if a value is an ObjectID.
* Checks if a value is a value ObjectID.
*

@@ -412,3 +412,3 @@ * @param value - Value to check.

*/
export declare function typeIsObjectID(value: any): value is ObjectID;
export declare function typeIsValidObjectID(value: any): value is ObjectID;
/**

@@ -415,0 +415,0 @@ * Checks if a value is a GeoCoordinate. Also ensures the longitude and latitude

@@ -33,3 +33,3 @@ "use strict";

return false;
if (!typeIsObjectID(value._id))
if (!typeIsValidObjectID(value._id))
return false;

@@ -40,3 +40,3 @@ return true;

/**
* Checks if a value is an ObjectID.
* Checks if a value is a value ObjectID.
*

@@ -47,8 +47,12 @@ * @param value - Value to check.

*/
function typeIsObjectID(value) {
function typeIsValidObjectID(value) {
if (is_1.default.nullOrUndefined(value))
return false;
if (!is_1.default.directInstanceOf(value, mongodb_1.ObjectID))
return false;
if (!mongodb_1.ObjectID.isValid(value))
return false;
return true;
}
exports.typeIsObjectID = typeIsObjectID;
exports.typeIsValidObjectID = typeIsValidObjectID;
/**

@@ -55,0 +59,0 @@ * Checks if a value is a GeoCoordinate. Also ensures the longitude and latitude

{
"name": "@andrewscwei/mongodb-odm",
"version": "0.12.0",
"version": "0.13.0",
"description": "ODM for MongoDB",

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

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