We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 010a2ac commit 6f28c6aCopy full SHA for 6f28c6a
examples/scan.js
@@ -1,7 +1,7 @@
1
var redis = require("redis"),
2
client = redis.createClient();
3
4
-var cursor = 0;
+var cursor = '0';
5
6
function scan() {
7
client.scan(
@@ -17,7 +17,7 @@ function scan() {
17
// From <http://redis.io/commands/scan>:
18
// An iteration starts when the cursor is set to 0,
19
// and terminates when the cursor returned by the server is 0.
20
- if (cursor === 0) {
+ if (cursor === '0') {
21
return console.log('Iteration complete');
22
} else {
23
// Remember, more keys than COUNT or no keys may be returned
0 commit comments