You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import assertString from './util/assertString';
|
|
var base32 = /^[A-Z2-7]+=*$/;
|
|
export default function isBase32(str) {
|
|
assertString(str);
|
|
var len = str.length;
|
|
|
|
if (len > 0 && len % 8 === 0 && base32.test(str)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
} |