Check if a value is base32 encoded
JavaScript
const isBase32 = (value) => value.length % 8 === 0 && /^[A-Z2-7]+=*$/.test(value)
TypeScript
const isBase32 = (value: string): boolean => value.length % 8 === 0 && /^[A-Z2-7]+=*$/.test(value)
const isBase32 = (value) => value.length % 8 === 0 && /^[A-Z2-7]+=*$/.test(value)
const isBase32 = (value: string): boolean => value.length % 8 === 0 && /^[A-Z2-7]+=*$/.test(value)