Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getLongestWord (line) {
const words = wrap.getChunks(line)
return words.reduce((max, word) => {
return Math.max(word.length, max)
}, 0)
}
function getLongestWord(line) {
var words = wrap.getChunks(line);
return words.reduce(function (max, word) {
return Math.max(word.length, max);
}, 0);
}