node-redis-scan
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "node-redis-scan", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A simple ES6 Redis key scanner for Node", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -38,7 +38,7 @@ # Node Redis key scanner | ||
scanner.scan('some-pattern*', (err, matchingKeys) => { | ||
if (err) throw(err); | ||
if (err) throw(err); | ||
// matchingKeys will be an array of strings if matches were found | ||
// otherwise it will be an empty array. | ||
console.log(matchingKeys); | ||
// matchingKeys will be an array of strings if matches were found | ||
// otherwise it will be an empty array. | ||
console.log(matchingKeys); | ||
}); | ||
@@ -73,12 +73,12 @@ ``` | ||
// this function will be passed an empty array. | ||
if (matchingKeys.length) { | ||
// matchingKeys found after this iteration of the SCAN command. | ||
console.log(matchingKeys); | ||
} | ||
if (matchingKeys.length) { | ||
// matchingKeys found after this iteration of the SCAN command. | ||
console.log(matchingKeys); | ||
} | ||
}, (err, matchCount) => { | ||
if (err) throw(err); | ||
if (err) throw(err); | ||
// matchCount will be an integer count of how many total keys | ||
// were found and passed to the intermediate callback. | ||
console.log(`Found ${matchCount} keys.`); | ||
// matchCount will be an integer count of how many total keys | ||
// were found and passed to the intermediate callback. | ||
console.log(`Found ${matchCount} keys.`); | ||
}); | ||
@@ -85,0 +85,0 @@ ``` |
79440