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

orbit-db-feedstore

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orbit-db-feedstore - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

package.json
{
"name": "orbit-db-feedstore",
"version": "0.1.1",
"version": "0.1.2",
"description": "Feed store for orbit-db",

@@ -12,5 +12,4 @@ "main": "src/FeedStore.js",

"dependencies": {
"lazy.js": "^0.4.2",
"orbit-db-eventstore": "0.1.1"
"orbit-db-eventstore": "0.1.3"
}
}

16

src/FeedIndex.js

@@ -1,4 +0,4 @@

'use strict';
'use strict'
const EventIndex = require('orbit-db-eventstore/src/EventIndex');
const EventIndex = require('orbit-db-eventstore/src/EventIndex')

@@ -8,15 +8,15 @@ class FeedIndex extends EventIndex {

added.reduce((handled, item) => {
if(handled.indexOf(item.hash) === -1) {
handled.push(item.hash);
if(!handled.includes(item.hash)) {
handled.push(item.hash)
if(item.payload.op === 'ADD') {
this._index[item.hash] = item
} else if(item.payload.op === 'DEL') {
delete this._index[item.payload.value];
delete this._index[item.payload.value]
}
}
return handled;
}, []);
return handled
}, [])
}
}
module.exports = FeedIndex;
module.exports = FeedIndex

@@ -1,11 +0,10 @@

'use strict';
'use strict'
const Lazy = require('lazy.js');
const EventStore = require('orbit-db-eventstore');
const FeedIndex = require('./FeedIndex');
const EventStore = require('orbit-db-eventstore')
const FeedIndex = require('./FeedIndex')
class FeedStore extends EventStore {
constructor(ipfs, id, dbname, options) {
if(!options) options = {};
if(!options.Index) Object.assign(options, { Index: FeedIndex });
if(!options) options = {}
if(!options.Index) Object.assign(options, { Index: FeedIndex })
super(ipfs, id, dbname, options)

@@ -22,7 +21,7 @@ }

}
};
return this._addOperation(operation);
}
return this._addOperation(operation)
}
}
module.exports = FeedStore;
module.exports = FeedStore
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