title: Determine if string is in base64 using JavaScript
body: <p>I'm using the <code>window.atob('string')</code> function to decode a string from base64 to a string. Now I wonder, is there any way to check that 'string' is actually valid base64? I would like to be notified if the string is not base64 so I can perform a different action.</p>