Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0.10 to 2.0.11

4

index.d.ts

@@ -1,2 +0,2 @@

import { MongoClient, MongoClientOptions } from "mongodb";
import { MongoClient, MongoClientOptions, ObjectId } from "mongodb";
import { XMongoSchemaBuilder, XMongoSchema, XMongoSchemaFn } from "./src/CustomTypes";

@@ -33,2 +33,2 @@ import is = require("./src/SchemaBuilder");

declare function RefreshDateOnUpdate(Model: typeof XMongoModel, field: string, ifHasChanges?: boolean): void;
export { is, Joi as joi, Client, XMongoModel, XMongoTypedModel, XMongoDataType, XMongoSchemaBuilder, XMongoSchema, XMongoSchemaFn, omitKeys, pickKeys, omitIdAnd, omitIdAndPick, parseServerUrl, RefreshDateOnUpdate };
export { is, Joi as joi, Client, XMongoModel, XMongoTypedModel, XMongoDataType, XMongoSchemaBuilder, XMongoSchema, XMongoSchemaFn, omitKeys, pickKeys, omitIdAnd, omitIdAndPick, parseServerUrl, RefreshDateOnUpdate, ObjectId };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RefreshDateOnUpdate = exports.parseServerUrl = exports.omitIdAndPick = exports.omitIdAnd = exports.pickKeys = exports.omitKeys = exports.XMongoDataType = exports.XMongoTypedModel = exports.XMongoModel = exports.Client = exports.joi = exports.is = void 0;
exports.ObjectId = exports.RefreshDateOnUpdate = exports.parseServerUrl = exports.omitIdAndPick = exports.omitIdAnd = exports.pickKeys = exports.omitKeys = exports.XMongoDataType = exports.XMongoTypedModel = exports.XMongoModel = exports.Client = exports.joi = exports.is = void 0;
const mongodb_1 = require("mongodb");
Object.defineProperty(exports, "ObjectId", { enumerable: true, get: function () { return mongodb_1.ObjectId; } });
// Require libs

@@ -6,0 +7,0 @@ const is = require("./src/SchemaBuilder");

{
"name": "xpress-mongo",
"version": "2.0.10",
"version": "2.0.11",
"description": "Light Weight ODM for mongoDb",

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

@@ -187,3 +187,3 @@ import ObjectCollection = require("object-collection");

*/
id(): ObjectId | null;
id(): ObjectId;
/**

@@ -308,3 +308,3 @@ * Use custom _id

*/
static id(str?: any): ObjectId | undefined;
static id(str?: any): ObjectId;
/**

@@ -311,0 +311,0 @@ * Find many in collection

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

static id(str) {
let _id = str || new mongodb_1.ObjectId();
let _id = str ? str : new mongodb_1.ObjectId();
if (typeof str === "string") {

@@ -904,3 +904,3 @@ try {

catch (e) {
return undefined;
throw new Error(`Model.id() Error: ${str} is not a valid ObjectId`);
}

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