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

mongo-iots-wrapper

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-iots-wrapper - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

7

lib/Collection.ts
import * as t from 'io-ts';
import { Db } from 'mongodb';
import { Db, ObjectId } from 'mongodb';
import { ExtendableObject } from './Utils';

@@ -95,4 +95,5 @@ import { errorReporter } from './ErrorReporter';

findById: async (id: string) => {
const document = (await collection.findOne({ _id: id })) as DOCUMENT;
findById: async (id: string | ObjectId) => {
const objectId = typeof id === 'string' ? new ObjectId(id) : id;
const document = (await collection.findOne({ _id: objectId })) as DOCUMENT;
if (document) {

@@ -99,0 +100,0 @@ errorReporter(document, validator);

{
"name": "mongo-iots-wrapper",
"version": "0.0.9",
"version": "0.0.10",
"description": "Strongly typed MongoDB",

@@ -5,0 +5,0 @@ "main": "dist/Index.js",

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