isEthereumAddress.js 497 B

1234567891011121314151617181920
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isEthereumAddress;
  6. var _assertString = _interopRequireDefault(require("./util/assertString"));
  7. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  8. var eth = /^(0x)[0-9a-f]{40}$/i;
  9. function isEthereumAddress(str) {
  10. (0, _assertString.default)(str);
  11. return eth.test(str);
  12. }
  13. module.exports = exports.default;
  14. module.exports.default = exports.default;