redis-json
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -0,1 +1,4 @@ | ||
# v4.2.1 | ||
* fixes #14, wherein when any prop was `set(id, {})` on an empty object, it wasn't reflected when `get()` was called on it | ||
# v4.2.0 | ||
@@ -2,0 +5,0 @@ * adds support for transactions via `setT`, `delT` & `rewriteT` methods |
@@ -269,4 +269,14 @@ import { promisify } from 'util'; | ||
if (!key) { | ||
result = val; | ||
return true; | ||
if (Object.keys(typedData).length <= 1) { | ||
result = val; | ||
return true; | ||
} | ||
else { | ||
// when the initial data is {'': {}} and | ||
// later a prop is added to the same, then | ||
// the data would be {'': {}, prop: {...}} | ||
// hence we need to continue the loop when | ||
// the keys.length > 1 | ||
return false; | ||
} | ||
} | ||
@@ -273,0 +283,0 @@ const splittedKeys = splitKey(key); |
@@ -271,4 +271,14 @@ 'use strict'; | ||
if (!key) { | ||
result = val; | ||
return true; | ||
if (Object.keys(typedData).length <= 1) { | ||
result = val; | ||
return true; | ||
} | ||
else { | ||
// when the initial data is {'': {}} and | ||
// later a prop is added to the same, then | ||
// the data would be {'': {}, prop: {...}} | ||
// hence we need to continue the loop when | ||
// the keys.length > 1 | ||
return false; | ||
} | ||
} | ||
@@ -275,0 +285,0 @@ const splittedKeys = splitKey(key); |
{ | ||
"name": "redis-json", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "A wrapper library to store JSON Objects in redis-hashsets and retrieve it back as JSON objects", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
157169
2356