File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,18 @@ const SET_NAME = 'user1:favorites';
1010// add an item to the set
1111// set members can only be `string | Buffer` so make sure to convert values if needed,
1212// https://redis.io/commands/sadd/
13- await client . SADD ( SET_NAME , '1' ) ;
13+ await client . sAdd ( SET_NAME , '1' ) ;
1414
1515// retrieve all the members of the set in one batch (be careful using it with "large" sets)
1616// https://redis.io/commands/smembers/
17- const favorites = await client . SMEMBERS ( SET_NAME ) ;
17+ const favorites = await client . sMembers ( SET_NAME ) ;
1818for ( const favorite of favorites ) {
1919 console . log ( favorite ) ;
2020}
2121
2222// retrieve all the members of the set in batches using SSCAN (useful with large sets)
2323// https://redis.io/commands/sscan/
24- for await ( const member of client . sScanIterator ( setName ) ) {
24+ for await ( const member of client . sScanIterator ( SET_NAME ) ) {
2525 console . log ( member ) ;
2626}
2727
You can’t perform that action at this time.
0 commit comments