orbit-db-feedstore
Advanced tools
Comparing version 0.2.0 to 1.0.0
{ | ||
"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', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4243
47
2
73
5
+ Addedbn.js@4.12.1(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedelliptic@6.6.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedipfs-log@4.0.6(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addednode-localstorage@1.3.1(transitive)
+ Addedorbit-db-eventstore@1.0.0(transitive)
+ Addedorbit-db-keystore@0.0.2(transitive)
+ Addedorbit-db-store@2.0.6(transitive)
+ Addedp-each-series@1.0.0(transitive)
+ Addedp-map@1.2.0(transitive)
+ Addedp-reduce@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedslide@1.1.6(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwrite-file-atomic@1.3.4(transitive)
- Removedipfs-log@2.0.0(transitive)
- Removedorbit-db-eventstore@0.2.0(transitive)
- Removedorbit-db-store@0.2.3(transitive)
- Removedp-map@1.0.0(transitive)
Updatedorbit-db-eventstore@~1.0.0