module.exports = format; function format(lab){ return function(author) { if(lab.findIndex(function(member, idx, ignore) { return author == member }) >= 0) { return ""+author.replace(/ /g, " ")+"" } else { return author.replace(/ /g, " ") } } }