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

gun-mongo-key

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gun-mongo-key - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

.travis.yml

23

gun-mongo-key.js

@@ -1,2 +0,2 @@

const {Flint, KeyValAdapter, Mixins} = require('gun-flint');
const {KeyValAdapter, Mixins} = require('gun-flint');
const Mongojs = require('mongojs');

@@ -12,3 +12,3 @@

Flint.register(new KeyValAdapter({
var gunMongoKey = new KeyValAdapter({
initialized: false,

@@ -76,3 +76,3 @@ written: 0,

// Find a single field
this._streamResults(this._getCollection(key).find({_id: getKeyField(key, field)}).limit(1), stream);
this._streamResults(this._getCollection().find({_id: getKeyField(key, field)}).limit(1), stream);
},

@@ -91,3 +91,3 @@

// Find an entire nodes key:val, stream results
this._streamResults(this._getCollection(key).find({key}), stream);
this._streamResults(this._getCollection().find({key}), stream);
},

@@ -106,2 +106,4 @@

let queryErr = null;
let internalErr = this.errors.internal;
let notFount = this.errors.lost;
result

@@ -119,6 +121,10 @@ .on('data', function(data) {

queryErr = err;
streamOut.done(queryErr ? this.errors.internal : null);
if (!err && !hasResult) {
streamOut.done(notFount);
} else {
streamOut.done(queryErr ? internalErr : null);
}
})
.on('close', function() {
streamOut.done(queryErr ? this.errors.internal : null);
streamOut.done(queryErr ? internalErr : null);
});

@@ -135,3 +141,2 @@ },

if (this.initialized && batch.length) {
// Essential info

@@ -177,2 +182,4 @@ let written = 0;

}
}));
});
module.exports = gunMongoKey;
{
"name": "gun-mongo-key",
"version": "0.0.1",
"version": "0.1.0",
"description": "A Mongo key:value adapter for Gunjs",
"main": "gun-mongo-key.js",
"main": "index.js",
"repository": {

@@ -19,2 +19,5 @@ "type": "git",

"license": "MIT",
"scripts": {
"test": "flint test ./gun-mongo-key.js --opt=./flint-opt.js"
},
"bugs": {

@@ -27,7 +30,3 @@ "url": "https://github.com/sjones6/gun-mongo-key/issues"

"mongojs": "^2.4.0"
},
"devDependencies": {
"expect": "^1.20.2",
"mocha": "^3.0.0"
}
}

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