Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 403 Bytes

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

File metadata and controls

19 lines (15 loc) · 403 Bytes
category created title updated
Validator
2021-04-10
Check if a value is base58 encoded
2021-10-13

JavaScript version

// It doesn't accept the I, O, l characters
const isBase58 = (value) => /^[A-HJ-NP-Za-km-z1-9]*$/.test(value);

TypeScript version

const isBase58 = (value: string): boolean => /^[A-HJ-NP-Za-km-z1-9]*$/.test(value);