First things first:
sudo apt update
sudo apt upgrade
const request = require('request') | |
const duplexify = require('duplexify') | |
const hyperlog = require('hyperlog') | |
const memdb = require('memdb') | |
const log = hyperlog(memdb()) | |
const url = 'http://localhost:4001/' | |
log.add(null, 'hello', function (err, node) { | |
if (err) throw err |
This is similar to Map Pan & Zoom IV but with unprojected raw GeoJSON, which is scaled to fit the canvas.
Some notes on how to use hyperx as a replacement for JSX. Need to try this out.
const functions = require('firebase-functions') | |
const path = require('path') | |
const gcs = require('@google-cloud/storage')() | |
module.exports = functions.storage.object().onChange(event => { | |
const object = event.data | |
const bucket = gcs.bucket(object.bucket) | |
// Exit if this is triggered on a file that is not an image. |
index ec505de..ff29709 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -191,25 +191,13 @@ DB.prototype.del = function (key, opts, cb) { | |
// OsmVersion, Opts -> [OsmBatchOp] | |
DB.prototype._getDocumentDeletionBatchOps = function (key, opts, cb) { | |
var self = this | |
- self.kv.get(key, function (err, docs) { | |
+ self.kv.get(key, {fields: true}, function (err, docs) { | |
if (err) return cb(err) |
/--- A1 <---\ | |
A0 <---- ---- A3 (deleted) | |
\--- A2 <---/ |
{ | |
"value": { | |
"refs": [ | |
"A", | |
"C", | |
"A", | |
"D" | |
], | |
"d": "F" | |
}, |
diff --git a/index.js b/index.js | |
index 79f78e4..e9897c0 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -101,7 +101,8 @@ KV.prototype.del = function (key, opts, cb) { | |
} | |
if (!opts) opts = {} | |
if (!cb) cb = noop | |
- self._put(key, { d: key }, opts, function (err, node) { | |
+ var value = xtend(opts.fields || {}, { k: key, d: true, v: opts.value }) |