etcd-result-objectify
Advanced tools
+2
-3
| sudo: false | ||
| language: node_js | ||
| node_js: | ||
| - "0.10" | ||
| - "4.*" | ||
| - "5.*" | ||
| - "10" | ||
| - "11" |
+10
-9
@@ -7,13 +7,14 @@ var assert = require('assert') | ||
| var r = {} | ||
| node.nodes.forEach(function (childNode) { | ||
| var split = childNode.key.split('/') | ||
| var key = split[split.length - 1] | ||
| if (node && node.nodes) { | ||
| node.nodes.forEach(function (childNode) { | ||
| var split = childNode.key.split('/') | ||
| var key = split[split.length - 1] | ||
| if (childNode.dir) | ||
| r[key] = nodeToObject(childNode) | ||
| else | ||
| r[key] = childNode.value | ||
| }); | ||
| if (childNode.dir) | ||
| r[key] = nodeToObject(childNode) | ||
| else | ||
| r[key] = childNode.value | ||
| }); | ||
| } | ||
| return r | ||
| } |
+1
-1
| { | ||
| "name": "etcd-result-objectify", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Objectify the results of a recursive etcd query", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,3 +27,9 @@ var assert = require('assert') | ||
| "createdIndex": 53 | ||
| } | ||
| }, | ||
| { | ||
| "key": "/emptyDirectory", | ||
| "dir": true, | ||
| "modifiedIndex": 54, | ||
| "createdIndex": 54 | ||
| } | ||
| ], | ||
@@ -38,3 +44,4 @@ "modifiedIndex": 35, | ||
| far: 'bar' | ||
| } | ||
| }, | ||
| emptyDirectory: {} | ||
| }) |
Sorry, the diff of this file is not supported yet
3660
4.13%59
18%6
-14.29%