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.2.0 to 1.0.0

4

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

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

"dependencies": {
"orbit-db-eventstore": "~0.2.0"
"orbit-db-eventstore": "~1.0.0"
}
}

@@ -41,5 +41,8 @@ # orbit-db-feedstore

const posts = feed.iterator().collect()
posts.forEach((post) => console.log(post.title + '\n', post.content))
// Hello
// World
posts.forEach((post) => {
let data = post.payload.value
console.log(data.title + '\n', data.content)
// Hello
// World
})
})

@@ -46,0 +49,0 @@ ```

@@ -13,3 +13,4 @@ 'use strict'

updateIndex(oplog) {
oplog.items.reduce((handled, item) => {
this._index = {}
oplog.values.reduce((handled, item) => {
if(!handled.includes(item.hash)) {

@@ -16,0 +17,0 @@ handled.push(item.hash)

@@ -7,9 +7,14 @@ 'use strict'

class FeedStore extends EventStore {
constructor(ipfs, id, dbname, options) {
constructor (ipfs, id, dbname, options) {
if(!options) options = {}
if(!options.Index) Object.assign(options, { Index: FeedIndex })
super(ipfs, id, dbname, options)
this._type = 'feed'
}
remove(hash) {
remove (hash) {
return this.del(hash)
}
del (hash) {
const operation = {

@@ -16,0 +21,0 @@ op: 'DEL',

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