API ReferenceValidationFunction
isPossiblyAnENSName()
function isPossiblyAnENSName(value): boolean;Check a string to see if it could possibly be an ENS name. This check is quite loose and only validates that the string has the format of a domain name (i.e “{name}.{tld}”). This can be used to gate against unnecessary calls to ENS resolution with obviously invalid ens names.
Parameters
| Parameter | Type |
|---|---|
value | string |
Returns
boolean