Skip to content

Commit

Permalink
feat: add hscanBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed May 8, 2022
1 parent 9685a16 commit 31fd985
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands/hscan.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { convertStringToBuffer } from '../commands-utils/convertStringToBuffer'
import { scanHelper } from '../commands-utils/scan-command.common'

export function hscan(key, cursor, ...args) {
Expand All @@ -7,3 +8,8 @@ export function hscan(key, cursor, ...args) {
const hKeys = Object.keys(this.data.get(key))
return scanHelper(hKeys, 1, cursor, ...args)
}

export function hscanBuffer(...args) {
const val = hscan.apply(this, args)
return convertStringToBuffer(val)
}

0 comments on commit 31fd985

Please sign in to comment.