UNPKG

internet-avatar.js

Version:

Library for connecting to Internet Avatar API.

30 lines (29 loc) 944 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.regex = exports.identifiersRegex = void 0; var types_1 = require("types"); exports.identifiersRegex = { ulid: { id: "[0-9A-Z]{26}", havePrefix: false, type: types_1.IdentifierType.ulid, }, email: { id: "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}", prefix: "(mail|email):", type: types_1.IdentifierType.email, }, discord: { id: "\\d{17,19}", prefix: "(discord|ds):", type: types_1.IdentifierType.discord, }, username: { id: "[a-zA-Z0-9_]{3,16}", prefix: "(username|user):", type: types_1.IdentifierType.username, }, }; exports.regex = { identifiersTotal: Object.values(exports.identifiersRegex).map(function (regex) { return regex.havePrefix !== false ? "".concat(regex.prefix).concat(regex.id) : regex.id; }).join("|") };