Skip to content

Instantly share code, notes, and snippets.

View fsteff's full-sized avatar
onto new challenges - to boldly go where no man has gone before

fsteff

onto new challenges - to boldly go where no man has gone before
View GitHub Profile
@fsteff
fsteff / index.js
Last active June 21, 2019 08:45
nanocomponent image problem
const choo = require('choo')
const html = require('choo/html')
const Nanocomponent = require('nanocomponent')
class Image extends Nanocomponent {
constructor (image) {
super()
this.image = image
}
const hyperdb = require('hyperdb')
const ram = require('random-access-memory')
function create (key, opts) {
opts = opts || {valueEncoding: 'utf-8'}
return hyperdb(ram, key, opts)
}
function replicate (a, b, opts) {
opts = opts || {live: true}