typed-conversions
Advanced tools
Comparing version 0.6.9 to 0.6.10
@@ -38,3 +38,3 @@ "use strict"; | ||
const hash = snap.val() || {}; | ||
return this.hashToArray(hash, idProp); | ||
return hashToArray(hash, idProp); | ||
} | ||
@@ -44,3 +44,5 @@ exports.snapshotToArray = snapshotToArray; | ||
const hash = snap.val() || {}; | ||
Object.keys(hash).forEach(key => hash[key][idProp] = key); | ||
Object.keys(hash).forEach(key => typeof hash[key] === 'object' | ||
? hash[key][idProp] = key | ||
: hash[key] = { [idProp]: key, value: hash[key] }); | ||
return hash; | ||
@@ -47,0 +49,0 @@ } |
{ | ||
"name": "typed-conversions", | ||
"version": "0.6.9", | ||
"version": "0.6.10", | ||
"description": "typed-conversions", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
9403
76