This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding testing for Redis All in One feature (#179)
- Loading branch information
1 parent
06b6b86
commit 9a46d69
Showing
17 changed files
with
266 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { RISSet } from "./ris.types"; | ||
|
||
export class RedisIntervalSetsHelpers { | ||
/** | ||
* Parsing the iset.get command response | ||
* @param sets The list of sets | ||
*/ | ||
parseGet(sets: string[][]): RISSet[] { | ||
const parsedSets: RISSet[] = []; | ||
for(const set of sets) { | ||
if(set.length > 2){ | ||
parsedSets.push({name: set[0], minimum: parseInt(set[1]), maximum: parseInt(set[2])}) | ||
} | ||
else { | ||
return [{minimum: parseInt(set[0]), maximum: parseInt(set[1])}] | ||
} | ||
} | ||
return parsedSets; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.