title: How to check if a string is plaintext or base64 format in Node.js
body: <p>I want to check if the given string to my function is plain text or base64 format. I am able to encode a plain text to base64 format and reverse it.
   But I could not figure out any way to validate if the string is already base64 format. Can anyone please suggest correct way of doing this in node js? Is there any API for doing this already available in node js.</p>