Last active
October 15, 2016 16:03
-
-
Save demosifter/318ee149c56c4e6645b1f2c46cd71ca6 to your computer and use it in GitHub Desktop.
requiring text-utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textUtils = require('@redsift/text-utilities'); | |
// ... | |
let counts = others.map(value => { | |
let text = value.textBody || value.strippedHtmlBody || ''; | |
let count = textUtils.splitWords(textUtils.trimEmailThreads(text)).length; | |
return count; | |
}); | |
console.log(counts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment