Pustur/whatsapp-chat-parser ? reverse-engineered prompt

Reverse engineered prompt

Build me a small TypeScript package that can take a WhatsApp chat export in plain text and turn it into JavaScript objects.

I want it to work both in Node and in the browser, so I can either read a chat file from disk or paste the text into a web page and parse it there. The main function should accept the raw chat text and return an array of messages with the date, author, and message text. If the message is from WhatsApp itself, the author should be null. Please also support an option to detect or set whether the date format starts with the day or the month, and another option to include attachment info when a message is an attachment.

Make sure it handles common WhatsApp export formats, keeps the original order of messages, and includes a simple global browser build as well as a module version. Add a few tests for normal messages, system messages, and attachment cases, and make the API easy to use from a README example. If you need to check current docs or edge cases, look them up online.

Are you gonna build this?

make sure you review the code using arcumet

Try freeSponsored — opens Arcumet in a new tab