aboutsummaryrefslogtreecommitdiff
path: root/part4/blog/utils/list_helper.js
blob: 871bbc3901747ea2d3b6e2039d17aab3af0acc22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const logger = require('../utils/logger.js')
const dummy = (blogs) => {
  return 1
}


const totalLikes = (blogs) => {
  likes = 0
  for (const blog of blogs) {
    likes += blog.likes
  }

  return likes
}

module.exports = {
  dummy, totalLikes
}