🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

etcd-dump

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

etcd-dump - npm Package Compare versions

Comparing version

to
0.1.0

10

index.js

@@ -14,9 +14,10 @@ // Requires

// to contain only a flat array of leaves
function cleanDump(obj) {
function normalize(obj) {
obj = obj.node || obj;
// Is a leaf
if(!_.has(obj, 'kvs')) {
if(!_.has(obj, 'nodes')) {
// We don't want the modifiedIndex attr in our dumps/restores
return _.pick(obj, 'key', 'value');
}
return _.flatten(_.map(obj.kvs, cleanDump));
return _.flatten(_.map(obj.nodes, normalize));
}

@@ -37,3 +38,3 @@

})
.then(cleanDump);
.then(normalize);
};

@@ -57,1 +58,2 @@

module.exports = createDumper;
module.exports.normalize = normalize;

2

package.json
{
"name": "etcd-dump",
"version": "0.0.6",
"version": "0.1.0",
"description": "A tool for dumping and restoring etcd",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet