diff options
Diffstat (limited to 'includes/external/addressbook/node_modules/validator/lib/isBase58.js')
-rw-r--r-- | includes/external/addressbook/node_modules/validator/lib/isBase58.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/includes/external/addressbook/node_modules/validator/lib/isBase58.js b/includes/external/addressbook/node_modules/validator/lib/isBase58.js new file mode 100644 index 0000000..a98c82c --- /dev/null +++ b/includes/external/addressbook/node_modules/validator/lib/isBase58.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBase58; + +var _assertString = _interopRequireDefault(require("./util/assertString")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz +var base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/; + +function isBase58(str) { + (0, _assertString.default)(str); + + if (base58Reg.test(str)) { + return true; + } + + return false; +} + +module.exports = exports.default; +module.exports.default = exports.default;
\ No newline at end of file |