function isAddress(value): value is string

Returns true if value is a valid address.

Parameters

ParameterTypeDescription
valueanyThe value to check.

Returns

value is string

True if the value is a valid address.

Example

// Valid address
isAddress('0x8ba1f109551bD432803012645Ac136ddd64DBA72');

// Invalid checksum
isAddress('0x8Ba1f109551bD432803012645Ac136ddd64DBa72');

Source

address/checks.ts:46