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

mongtype

Package Overview
Dependencies
Maintainers
8
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongtype - npm Package Compare versions

Comparing version 3.3.1 to 3.4.0

8

dist/Repository.d.ts

@@ -22,2 +22,10 @@ import { Collection, DeleteWriteOpResultObject } from 'mongodb';

/**
* Find multiple documents by a list of ids
*
* @param {string[]} ids
* @returns {Promise<T[]>}
* @memberof MongoRepository
*/
findManyById(ids: string[]): Promise<T[]>;
/**
* Finds a record by a list of conditions

@@ -24,0 +32,0 @@ *

@@ -29,2 +29,18 @@ "use strict";

/**
* Find multiple documents by a list of ids
*
* @param {string[]} ids
* @returns {Promise<T[]>}
* @memberof MongoRepository
*/
async findManyById(ids) {
const collection = await this.collection;
const found = await collection.find({ _id: { $in: ids.map(id => new mongodb_1.ObjectID(id)) } }).toArray();
const results = [];
for (const result of found) {
results.push(await this.invokeEvents(Types_1.POST_KEY, ['find', 'findMany'], this.toggleId(result, false)));
}
return results;
}
/**
* Finds a record by a list of conditions

@@ -31,0 +47,0 @@ *

2

package.json
{
"name": "mongtype",
"version": "3.3.1",
"version": "3.4.0",
"description": "Mongo Repository for Node written in TypeScript",

@@ -5,0 +5,0 @@ "main": "dist/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