We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents df91b05 + 09fde58 commit 9df6b69Copy full SHA for 9df6b69
base64.ts
@@ -215,7 +215,7 @@ const decode = (src: string) => _decode(_unURI(src));
215
* check if a value is a valid Base64 string
216
* @param {String} src a value to check
217
*/
218
-const isValid = (src: any) => {
+const isValid = (src: unknown) => {
219
if (typeof src !== 'string') return false;
220
const s = src.replace(/\s+/g, '').replace(/={0,2}$/, '');
221
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
0 commit comments