I am currently trying to convert a base64 string to a zip file and then extract it.
for example would decoding a base64 string to pdf and zip file be completly different process.
base64 is just a data encoding format. Whatever input data you encoded as base64, will come out on the other side when you decode it. So the process for encoding/decoding the file contents as base64 is the same, no matter what the file type is.
Asking for a recommendation of a node.js module to help with encoding/decoding is off-topic on Stack Overflow, but if you do a quick google search I'm quite sure multiple good options will show up, such as this highly upvoted answer: How to do Base64 encoding in node.js?