mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-25 18:47:58 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isEthereumAddress = isEthereumAddress;
|
||||
const util_1 = require("@pezkuwi/util");
|
||||
const isChecksum_js_1 = require("./isChecksum.js");
|
||||
function isEthereumAddress(address) {
|
||||
if (!address || address.length !== 42 || !(0, util_1.isHex)(address)) {
|
||||
return false;
|
||||
}
|
||||
else if (/^(0x)?[0-9a-f]{40}$/.test(address) || /^(0x)?[0-9A-F]{40}$/.test(address)) {
|
||||
return true;
|
||||
}
|
||||
return (0, isChecksum_js_1.isEthereumChecksum)(address);
|
||||
}
|
||||
Reference in New Issue
Block a user