Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 391 Bytes

check-if-a-value-is-base32-encoded.mdx

File metadata and controls

18 lines (14 loc) · 391 Bytes
category created title updated
Validator
2021-04-10
Check if a value is base32 encoded
2021-10-13

JavaScript version

const isBase32 = (value) => value.length % 8 === 0 && /^[A-Z2-7]+=*$/.test(value);

TypeScript version

const isBase32 = (value: string): boolean => value.length % 8 === 0 && /^[A-Z2-7]+=*$/.test(value);