(str)
| 497 | } |
| 498 | |
| 499 | function isBase64 (str) { |
| 500 | try { |
| 501 | const decoded = new TextDecoder().decode(Uint8Array.from(atob(str), c => c.charCodeAt(0))) |
| 502 | return btoa(decoded) === str |
| 503 | } catch (err) { |
| 504 | return false |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | export const genericUtilPlugin = { |
| 509 | install (app) { |