From 31fd985801d37377f70f0583d1ba6471effd9d8d Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Sun, 8 May 2022 22:50:47 +0200 Subject: [PATCH] feat: add hscanBuffer --- src/commands/hscan.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands/hscan.js b/src/commands/hscan.js index 4db27dcf0..fac2ed15e 100644 --- a/src/commands/hscan.js +++ b/src/commands/hscan.js @@ -1,3 +1,4 @@ +import { convertStringToBuffer } from '../commands-utils/convertStringToBuffer' import { scanHelper } from '../commands-utils/scan-command.common' export function hscan(key, cursor, ...args) { @@ -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) +}