-
-
Save stockholmux/5b5e14918e5959a772231896c2be6271 to your computer and use it in GitHub Desktop.
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
client.multi([ | |
["bitcount", "article1:today"], | |
["bitcount", "article2:today"], | |
["bitcount", "article3:today"] | |
]).exec((err, totals) => { | |
let total = totals.reduce(function(prev, cur) { | |
return prev + cur; | |
}, 0); | |
console.log("Total views: ", total); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment