Comparing version 0.0.6 to 0.0.7
@@ -302,2 +302,7 @@ const codecs = require('codecs') | ||
async peek (opts) { | ||
const b = new Batch(this, false, true, { ...opts }) | ||
return b.peek(opts) | ||
} | ||
createReadStream (opts) { | ||
@@ -396,3 +401,3 @@ return iteratorToStream(new RangeIterator(new Batch(this, false, false, opts), opts)) | ||
async peek (range) { | ||
const ite = new RangeIterator(range) | ||
const ite = new RangeIterator(this, range) | ||
await ite.open() | ||
@@ -399,0 +404,0 @@ return ite.next() |
{ | ||
"name": "hyperbee", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "An append-only Btree running on a Hypercore.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -130,3 +130,4 @@ # Hyperbee 🐝 | ||
reverse: false, // if true get from the newest to the oldest | ||
since: seq // start with this seq | ||
since: seq // start with this seq, | ||
limit: -1 // set to the max number of entries you want | ||
} | ||
@@ -133,0 +134,0 @@ ```` |
const tape = require('tape') | ||
const Hyperbee = require('..') | ||
const { create, collect } = require('./helpers') | ||
@@ -161,14 +161,1 @@ tape('out of bounds iterator', async function (t) { | ||
}) | ||
function collect (stream) { | ||
return new Promise(resolve => { | ||
const entries = [] | ||
stream.on('data', d => entries.push(d)) | ||
stream.on('end', () => resolve(entries)) | ||
}) | ||
} | ||
function create (opts) { | ||
const feed = require('hypercore')(require('random-access-memory')) | ||
return new Hyperbee(feed, opts) | ||
} |
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
65095
18
1919
170