Skip to content

isAddress

isAddress(address): boolean

Defined in: utils/is-address.ts:27

Returns a boolean as to whether the input is a valid address. Does NOT support ICAP addresses

Parameters

address

string

the address to check the validity of

Returns

boolean

a boolean for whether the input is a valid address

Examples

isAddress('0xc0deaf6bd3f0c6574a6a625ef2f22f62a5150eab');
// true
isAddress('bad');
// false
// Does NOT support ENS.
isAddress('vitalik.eth');
// false