Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pull(
- ssb.createFeedStream(),
- pull.reduce(function (acc, item) {
- if (item.message) {
- var vote = parseInt(item.message.toString(), 10);
- if (!isNaN(vote)) {
- console.log('vote: ', vote);
- return acc + vote;
- } else {
- return 0;
- }
- }
- }, 0, function (err, result) {
- console.log('result: ', result);
- })
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement