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

reactive-mongodb

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

reactive-mongodb - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

33

modules/collection.module.js

@@ -14,6 +14,10 @@ const Observable = require('rxjs/Rx').Observable;

class Collection {
constructor(name) {
this.collection = global.db.collection(name);
this.name = name;
}
insert(object) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -29,4 +33,8 @@ (observer) => {

});
}
updateOne(object, newObject) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -43,2 +51,5 @@ (observer) => {

update(object, newObject) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -59,2 +70,5 @@ (observer) => {

updateById(id, newObject) {
if (!this.collection) {
this.collection = global.db.collection(this.namename);
}
return Observable.create(

@@ -77,2 +91,5 @@ (observer) => {

delete(query) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -89,2 +106,5 @@ (observer) => {

deleteById(id) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -107,2 +127,5 @@ (observer) => {

find(query) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -122,2 +145,5 @@ (observer) => {

findOne(query) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -140,2 +166,5 @@ (observer) => {

findById(id) {
if (!this.collection) {
this.collection = global.db.collection(this.name);
}
return Observable.create(

@@ -163,2 +192,2 @@ (observer) => {

module.exports = Collection;
module.exports = Collection;

2

package.json
{
"name": "reactive-mongodb",
"version": "0.1.3",
"version": "0.1.4",
"description": "An ODM for MongoDB with very strict data types/stucture. It is Based on Observable (with RxJS)",

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