I want to stop using the async library, replacing it with vanilla js.
const async = require('async')
function getTopicsData(tids, Uid, callback) {
async.map(tids, (tid, next) => {
redis.hgetall(`topic:${tid}`, (err, topics) => {
redis.sismember(`topic:${tid}:subscribers`, Uid, (err, subscriber) => {
topics.subscriber = !!subscriber
next(false, topics)
})
})
}, callback)
}
module.exports = getTopicsData