@azizbecha/strkit
Version:
strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.
12 lines (11 loc) • 437 B
TypeScript
/**
* Validates whether a given string is a valid Bitcoin address.
*
* @param address - The string to check if it's a valid Bitcoin address.
* @returns A boolean indicating whether the string is a valid Bitcoin address.
*
* @example
* isBtcAddress("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"); // Output: true
* isBtcAddress("not-a-bitcoin-address"); // Output: false
*/
export default function isBtcAddress(address: string): boolean;