node-ejs-renderer/node_modules/validator/es/lib/isEthereumAddress.js

6 lines
176 B
JavaScript
Raw Normal View History

2024-06-09 13:55:01 -04:00
import assertString from './util/assertString';
var eth = /^(0x)[0-9a-f]{40}$/i;
export default function isEthereumAddress(str) {
assertString(str);
return eth.test(str);
}