mafintosh / mafintosh/append-tree

README tweak

Open
#9 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
55
Forks
13
PR merge metrics
No merged PRs in 30d

Description

In the readme, you mention that the hypercore feed can be faked with:

> any append-only log that supports `.append()` and `.length`

But in testing, I found more was needed. So I made a simple minimal interface.

```js
// Fake hypercore feed for testing and learning
var values = []
var feed = {
append (value, cb) {
console.log('APPEND', {value, cb})
values.push(value)
nextTick(cb)
},
get (index, options, cb) {
console.log('GET', {index, options, cb})
nextTick(cb, null, values[index])
},
get length () {
console.log('LENGTH')
return values.length
},
ready (cb) {
console.log('READY', {cb})
nextTick(cb)
}
}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the README at the statement describing the minimal hypercore feed interface, then compare it with the supplied fake feed example. Done means the README accurately documents the methods and property needed for testing; no test path is mentioned in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.