(key)
| 197 | } |
| 198 | |
| 199 | async hgetall(key) { |
| 200 | const hash = this.hashes.get(key); |
| 201 | if (!hash) return {}; |
| 202 | |
| 203 | return Array.from(hash.entries()).reduce((acc, [field, value]) => { |
| 204 | acc[field] = value; |
| 205 | return acc; |
| 206 | }, {}); |
| 207 | } |
| 208 | |
| 209 | async zscore(key, member) { |
| 210 | const sortedSet = this.sortedSets.get(key); |
no test coverage detected