crisp-oss / email-forward-parser

🐛 Parses forwarded emails and extracts original content.
https://www.npmjs.com/package/email-forward-parser
MIT License
55 stars 23 forks source link

return empty arrays for to, cc #1

Closed katlim-br closed 2 years ago

katlim-br commented 2 years ago

Hello I would like to put this PR for your library where the __parseMailbox does give you an empty array when there is no data to parse.

This in practice only affects CC field, To will always be there.

I updated the tests as well.

katlim-br commented 2 years ago

@eliottvincent is this convenient? I think so, it will save a lot of code downstream. please your review.

eliottvincent commented 2 years ago

Hey Katlim! Thanks for the PR. I've done the necessary changes in version 1.0.22.