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

@otokton/common

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@otokton/common - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/databases/abstract-mongo.d.ts

@@ -7,3 +7,3 @@ import { Db } from 'mongodb';

constructor(uri: string);
db(): Db;
get db(): Db;
connect(): void;

@@ -10,0 +10,0 @@ createCollection(schema: JsonSchemaMongo[]): void;

@@ -7,7 +7,11 @@ "use strict";

this._client = new mongodb_1.MongoClient(uri, { useUnifiedTopology: true });
this._db = this._client.db();
this._db = {};
}
AbstractMongoDatabase.prototype.db = function () {
return this._db;
};
Object.defineProperty(AbstractMongoDatabase.prototype, "db", {
get: function () {
return this._db;
},
enumerable: true,
configurable: true
});
AbstractMongoDatabase.prototype.connect = function () {

@@ -14,0 +18,0 @@ var _this = this;

@@ -49,4 +49,3 @@ "use strict";

return __generator(this, function (_a) {
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -64,4 +63,3 @@ .find()

return __generator(this, function (_a) {
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -81,4 +79,3 @@ .findOne(new mongodb_1.ObjectID(id))

return __generator(this, function (_a) {
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -95,4 +92,3 @@ .find(parameters)

return __generator(this, function (_a) {
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -109,4 +105,3 @@ .insertOne(o)

return __generator(this, function (_a) {
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -128,4 +123,3 @@ .findOneAndUpdate({ _id: new mongodb_1.ObjectID(id) }, {

return __generator(this, function (_a) {
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -141,4 +135,3 @@ .deleteOne({ _id: new mongodb_1.ObjectID(id) })];

p = parameters ? parameters : {};
return [2 /*return*/, this.database
.db()
return [2 /*return*/, this.database.db
.collection(this.collectionName)

@@ -145,0 +138,0 @@ .find(parameters)

{
"name": "@otokton/common",
"version": "0.1.2",
"version": "0.1.3",
"private": false,

@@ -17,8 +17,6 @@ "main": "dist/index.js",

},
"dependencies": {
"@types/koa": "^2.13.3"
},
"devDependencies": {
"@types/axios": "^0.14.0",
"@types/mongodb": "^3.6.17",
"@types/koa": "^2.13.3",
"chai": "^4.1.2",

@@ -25,0 +23,0 @@ "eslint": "^6.7.2",

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