mongo-iots-wrapper
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -39,2 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var mongodb_1 = require("mongodb"); | ||
var ErrorReporter_1 = require("./ErrorReporter"); | ||
@@ -98,6 +99,8 @@ exports.createCollection = function (database, collectionName, validator) { | ||
findById: function (id) { return __awaiter(_this, void 0, void 0, function () { | ||
var document; | ||
var objectId, document; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, collection.findOne({ _id: id })]; | ||
case 0: | ||
objectId = typeof id === 'string' ? new mongodb_1.ObjectId(id) : id; | ||
return [4 /*yield*/, collection.findOne({ _id: objectId })]; | ||
case 1: | ||
@@ -104,0 +107,0 @@ document = (_a.sent()); |
{ | ||
"name": "mongo-iots-wrapper", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Strongly typed MongoDB", | ||
@@ -5,0 +5,0 @@ "main": "dist/Index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73387
1176