You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2023. It is now read-only.
_read(ops,hash,amount,inclusive){// Find the index of the gt/lt hash, or start from the beginning of the array if not foundconstindex=ops.map((e)=>e.hash).indexOf(hash)letstartIndex=Math.max(index,0)// If gte/lte is set, we include the given hash, if not, start from the next elementstartIndex+=inclusive ? 0 : 1// Slice the array to its requested sizeconstres=ops.slice(startIndex).slice(0,amount)returnres}
If you call this method with a hash (let's say "foobar") that's not present in the EventStore, you'll notice that _read still returns the element at 0th index. We noticed this while using get() method in the FeedStore (https://github.com/orbitdb/orbit-db-feedstore/blob/main/src/FeedStore.js).