From 30d8c7b179cbfa561c07e3a1cc15382bfc080eae Mon Sep 17 00:00:00 2001 From: James Xin Date: Thu, 26 Sep 2024 11:58:21 -0700 Subject: [PATCH] post rebase clean up Signed-off-by: James Xin --- node/src/Commands.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/node/src/Commands.ts b/node/src/Commands.ts index e9ed54ccec..fbeb77683c 100644 --- a/node/src/Commands.ts +++ b/node/src/Commands.ts @@ -2502,23 +2502,21 @@ export interface BitOffsetOptions { * If no index type is provided, the indexes will be assumed to be byte indexes. */ indexType?: BitmapIndexType; -}; +} /** * @internal */ -function joinBitOptions(options: BitOffsetOptions): GlideString[] { +function convertBitOptionsToArgs(options?: BitOffsetOptions): GlideString[] { const args: GlideString[] = []; if (!options) return args; - if (options.start !== undefined) { - args.push(options.start.toString()); + args.push(options.start.toString()); - if (options.end !== undefined) { - args.push(options.end.toString()); + if (options.end !== undefined) { + args.push(options.end.toString()); - if (options.indexType) args.push(options.indexType); - } + if (options.indexType) args.push(options.indexType); } return args; @@ -2534,7 +2532,7 @@ export function createBitCount( let args: GlideString[] = [key]; if (options) { - const optionResults: GlideString[] = joinBitOptions(options); + const optionResults: GlideString[] = convertBitOptionsToArgs(options); args = args.concat(optionResults); }