Permalink
Browse files

Use `JSON.parse(JSON.stringify())` trick because JS objects are weird

  • Loading branch information...
christianbundy committed Feb 5, 2019
1 parent 28ce126 commit 1995a8ea7c39e2011c9f2d7f57ba6241df9f98f0
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
@@ -196,7 +196,7 @@ function setupContext (appName, opts, cb) {
ssbConfig.remote = `unix:${socketPath}:~noauth:${pubkey}`
}

const redactedConfig = Object.assign({}, ssbConfig);
const redactedConfig = JSON.parse(JSON.stringify(ssbConfig))
redactedConfig.keys.private = null
console.log(redactedConfig)

0 comments on commit 1995a8e

Please sign in to comment.