From a0f73582b474269ac3147f378ef87e963d42bb09 Mon Sep 17 00:00:00 2001 From: ansuz Date: Sat, 11 Mar 2017 15:49:12 +0100 Subject: [PATCH] serialize pub location along with peering data --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7c80608..9d95366 100644 --- a/index.js +++ b/index.js @@ -43,7 +43,9 @@ var Fs = require("fs"), find(peers, A.slice(1))[name] = {}; walk(A.concat(name)); } else if (/\.k$/.test(name)) { - find(peers, A.slice(1))[name] = read(fullPath); + var obj = find(peers, A.slice(1))[name] = read(fullPath); + // embed the location in the object + obj.location = A.slice(1); } }); }; @@ -69,7 +71,6 @@ var Fs = require("fs"), var path = p.slice(0).concat(k); if (isCred(k)) { - //console.log(o[k]); L.push(f(o[k], path)); } walk(o[k], path, f);