shufflecom-calculations 2.3.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/airdrop/airdrop-calculator.d.ts +44 -0
- package/lib/airdrop/airdrop-calculator.js +96 -0
- package/lib/airdrop/airdrop-calculator.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/regex/index.js +1 -1
- package/lib/regex/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/vip-level-base.type.d.ts +19 -0
- package/lib/types/vip-level-base.type.js +84 -0
- package/lib/types/vip-level-base.type.js.map +1 -0
- package/lib/types/vip-level.type.d.ts +57 -0
- package/lib/types/vip-level.type.js +62 -0
- package/lib/types/vip-level.type.js.map +1 -0
- package/lib/utils/sports-content-fixture.types.d.ts +2 -2
- package/lib/utils/sports.types.js.map +1 -1
- package/package.json +2 -2
- package/src/airdrop/airdrop-calculator.spec.ts +327 -0
- package/src/airdrop/airdrop-calculator.ts +140 -0
- package/src/index.ts +2 -0
- package/src/regex/index.ts +2 -2
- package/src/regex/regex.spec.ts +6 -15
- package/src/types/vip-level-base.type.ts +81 -0
- package/src/types/vip-level.type.ts +57 -0
- package/src/utils/sports-content-fixture.types.ts +2 -2
- package/src/utils/sports.types.ts +5 -1
- package/lib/utils/airdrop.d.ts +0 -26
- package/lib/utils/airdrop.js +0 -51
- package/lib/utils/airdrop.js.map +0 -1
- package/src/utils/airdrop.spec.ts +0 -162
- package/src/utils/airdrop.ts +0 -92
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { VipLevel } from '../types/vip-level.type';
|
|
3
|
+
import { Currency } from '../utils/currency';
|
|
4
|
+
type AirdropMultiplier = {
|
|
5
|
+
bps: number;
|
|
6
|
+
raw: number;
|
|
7
|
+
};
|
|
8
|
+
type TokenAllocation = {
|
|
9
|
+
allocatedAmount: BigNumber;
|
|
10
|
+
usdWageredSnapshot?: BigNumber;
|
|
11
|
+
eventId: number;
|
|
12
|
+
};
|
|
13
|
+
type AirdropAllocationInfoArgs = {
|
|
14
|
+
tokenAllocations: TokenAllocation[];
|
|
15
|
+
tokensClaimed: BigNumber;
|
|
16
|
+
usdTotalWagered: BigNumber;
|
|
17
|
+
hasKyc2: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type AirdropAllocationInfo = {
|
|
20
|
+
totalAllocation: BigNumber;
|
|
21
|
+
tokensClaimed: BigNumber;
|
|
22
|
+
tokensClaimable: BigNumber;
|
|
23
|
+
};
|
|
24
|
+
export declare class AirdropCalculator {
|
|
25
|
+
static readonly points_normalizer = 0.04;
|
|
26
|
+
static readonly min_edge_threshold = 0.01;
|
|
27
|
+
static readonly default_multiplier = 1;
|
|
28
|
+
static readonly original_game_multiplier = 1.2;
|
|
29
|
+
static readonly shfl_multiplier = 1.25;
|
|
30
|
+
static readonly allocation_instant_unlock = 0.1;
|
|
31
|
+
static readonly default_usd_wager_to_vest_rate = 20;
|
|
32
|
+
static readonly kyc2_usd_wager_to_vest_rate = 10;
|
|
33
|
+
private static formatMultiplier;
|
|
34
|
+
static getGameMultiplier(providerIsShuffle: boolean): AirdropMultiplier;
|
|
35
|
+
static getCurrencyMultiplier(currency?: Currency): AirdropMultiplier;
|
|
36
|
+
static getRankMultiplier(vipLevel: VipLevel): AirdropMultiplier;
|
|
37
|
+
static getAirdropEventStartDate(distributionDate: Date): Date;
|
|
38
|
+
static calculateAirdropPoints({ vipLevel, airdropWageredEv }: {
|
|
39
|
+
vipLevel: VipLevel;
|
|
40
|
+
airdropWageredEv: BigNumber;
|
|
41
|
+
}): BigNumber;
|
|
42
|
+
static getTokenAllocationInfo({ tokenAllocations, tokensClaimed, usdTotalWagered, hasKyc2 }: AirdropAllocationInfoArgs): AirdropAllocationInfo;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AirdropCalculator = void 0;
|
|
7
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
|
+
const isSameOrAfter_1 = __importDefault(require("dayjs/plugin/isSameOrAfter"));
|
|
10
|
+
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
11
|
+
const vip_level_base_type_1 = require("../types/vip-level-base.type");
|
|
12
|
+
const currency_1 = require("../utils/currency");
|
|
13
|
+
dayjs_1.default.extend(isSameOrAfter_1.default);
|
|
14
|
+
dayjs_1.default.extend(utc_1.default);
|
|
15
|
+
const BPS_DIVISOR = 10000;
|
|
16
|
+
const VIP_RANK_TO_MULTIPLIER = {
|
|
17
|
+
[vip_level_base_type_1.VipLevelBase.UNRANKED]: 1,
|
|
18
|
+
[vip_level_base_type_1.VipLevelBase.WOOD]: 1,
|
|
19
|
+
[vip_level_base_type_1.VipLevelBase.BRONZE]: 1,
|
|
20
|
+
[vip_level_base_type_1.VipLevelBase.SILVER]: 1.01,
|
|
21
|
+
[vip_level_base_type_1.VipLevelBase.GOLD]: 1.02,
|
|
22
|
+
[vip_level_base_type_1.VipLevelBase.PLATINUM]: 1.03,
|
|
23
|
+
[vip_level_base_type_1.VipLevelBase.JADE]: 1.04,
|
|
24
|
+
[vip_level_base_type_1.VipLevelBase.SAPPHIRE]: 1.05,
|
|
25
|
+
[vip_level_base_type_1.VipLevelBase.RUBY]: 1.06,
|
|
26
|
+
[vip_level_base_type_1.VipLevelBase.DIAMOND]: 1.07,
|
|
27
|
+
[vip_level_base_type_1.VipLevelBase.OPAL]: 1.08,
|
|
28
|
+
[vip_level_base_type_1.VipLevelBase.DRAGON]: 1.09,
|
|
29
|
+
[vip_level_base_type_1.VipLevelBase.MYTHIC]: 1.1,
|
|
30
|
+
[vip_level_base_type_1.VipLevelBase.DARK]: 1.1,
|
|
31
|
+
[vip_level_base_type_1.VipLevelBase.LEGEND]: 1.1,
|
|
32
|
+
};
|
|
33
|
+
class AirdropCalculator {
|
|
34
|
+
static formatMultiplier(value) {
|
|
35
|
+
return {
|
|
36
|
+
bps: (0, bignumber_js_1.default)(value).multipliedBy(BPS_DIVISOR).toNumber(),
|
|
37
|
+
raw: value,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static getGameMultiplier(providerIsShuffle) {
|
|
41
|
+
if (providerIsShuffle) {
|
|
42
|
+
return this.formatMultiplier(this.original_game_multiplier);
|
|
43
|
+
}
|
|
44
|
+
return this.formatMultiplier(this.default_multiplier);
|
|
45
|
+
}
|
|
46
|
+
static getCurrencyMultiplier(currency) {
|
|
47
|
+
if (currency === currency_1.Currency.SHFL)
|
|
48
|
+
return this.formatMultiplier(this.shfl_multiplier);
|
|
49
|
+
return this.formatMultiplier(this.default_multiplier);
|
|
50
|
+
}
|
|
51
|
+
static getRankMultiplier(vipLevel) {
|
|
52
|
+
return this.formatMultiplier(VIP_RANK_TO_MULTIPLIER[(0, vip_level_base_type_1.getVipLevelBase)(vipLevel)]);
|
|
53
|
+
}
|
|
54
|
+
static getAirdropEventStartDate(distributionDate) {
|
|
55
|
+
return (0, dayjs_1.default)(distributionDate).subtract(1, 'week').add(1, 'minute').toDate();
|
|
56
|
+
}
|
|
57
|
+
static calculateAirdropPoints({ vipLevel, airdropWageredEv }) {
|
|
58
|
+
const rankMultiplier = this.getRankMultiplier(vipLevel).raw;
|
|
59
|
+
return airdropWageredEv.multipliedBy(rankMultiplier).dividedBy(this.points_normalizer);
|
|
60
|
+
}
|
|
61
|
+
static getTokenAllocationInfo({ tokenAllocations, tokensClaimed, usdTotalWagered, hasKyc2 }) {
|
|
62
|
+
let totalAllocation = new bignumber_js_1.default(0);
|
|
63
|
+
let totalUnlockedAmount = new bignumber_js_1.default(0);
|
|
64
|
+
let wagerConsumedSoFar = new bignumber_js_1.default(0);
|
|
65
|
+
const sortedAllocations = tokenAllocations.sort((a, b) => b.eventId - a.eventId);
|
|
66
|
+
for (const allocation of sortedAllocations) {
|
|
67
|
+
if ((allocation === null || allocation === void 0 ? void 0 : allocation.usdWageredSnapshot) && allocation.allocatedAmount.isGreaterThan(0)) {
|
|
68
|
+
const initialUnlockedAmount = allocation.allocatedAmount.multipliedBy(this.allocation_instant_unlock);
|
|
69
|
+
const wagerToVestRate = new bignumber_js_1.default(hasKyc2 ? this.kyc2_usd_wager_to_vest_rate : this.default_usd_wager_to_vest_rate);
|
|
70
|
+
const wageredSinceSnapshot = usdTotalWagered.minus(allocation.usdWageredSnapshot);
|
|
71
|
+
const availableWager = bignumber_js_1.default.max(0, wageredSinceSnapshot.minus(wagerConsumedSoFar));
|
|
72
|
+
const wagerToVestAmount = availableWager.dividedBy(wagerToVestRate);
|
|
73
|
+
const totalUnlocked = bignumber_js_1.default.min(allocation.allocatedAmount, initialUnlockedAmount.plus(wagerToVestAmount));
|
|
74
|
+
const wagerConsumed = totalUnlocked.minus(initialUnlockedAmount).multipliedBy(wagerToVestRate);
|
|
75
|
+
wagerConsumedSoFar = wagerConsumedSoFar.plus(wagerConsumed);
|
|
76
|
+
totalUnlockedAmount = totalUnlockedAmount.plus(totalUnlocked);
|
|
77
|
+
}
|
|
78
|
+
totalAllocation = totalAllocation.plus(allocation.allocatedAmount);
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
totalAllocation,
|
|
82
|
+
tokensClaimed,
|
|
83
|
+
tokensClaimable: bignumber_js_1.default.max(0, totalUnlockedAmount.minus(tokensClaimed)),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.AirdropCalculator = AirdropCalculator;
|
|
88
|
+
AirdropCalculator.points_normalizer = 0.04;
|
|
89
|
+
AirdropCalculator.min_edge_threshold = 0.01;
|
|
90
|
+
AirdropCalculator.default_multiplier = 1;
|
|
91
|
+
AirdropCalculator.original_game_multiplier = 1.2;
|
|
92
|
+
AirdropCalculator.shfl_multiplier = 1.25;
|
|
93
|
+
AirdropCalculator.allocation_instant_unlock = 0.1;
|
|
94
|
+
AirdropCalculator.default_usd_wager_to_vest_rate = 20;
|
|
95
|
+
AirdropCalculator.kyc2_usd_wager_to_vest_rate = 10;
|
|
96
|
+
//# sourceMappingURL=airdrop-calculator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"airdrop-calculator.js","sourceRoot":"","sources":["../../src/airdrop/airdrop-calculator.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,kDAA0B;AAC1B,+EAAuD;AACvD,2DAAmC;AACnC,sEAA6E;AAE7E,gDAA6C;AAC7C,eAAK,CAAC,MAAM,CAAC,uBAAa,CAAC,CAAC;AAC5B,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAElB,MAAM,WAAW,GAAG,KAAM,CAAC;AAE3B,MAAM,sBAAsB,GAAiC;IAC3D,CAAC,kCAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1B,CAAC,kCAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IACtB,CAAC,kCAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IACxB,CAAC,kCAAY,CAAC,MAAM,CAAC,EAAE,IAAI;IAC3B,CAAC,kCAAY,CAAC,IAAI,CAAC,EAAE,IAAI;IACzB,CAAC,kCAAY,CAAC,QAAQ,CAAC,EAAE,IAAI;IAC7B,CAAC,kCAAY,CAAC,IAAI,CAAC,EAAE,IAAI;IACzB,CAAC,kCAAY,CAAC,QAAQ,CAAC,EAAE,IAAI;IAC7B,CAAC,kCAAY,CAAC,IAAI,CAAC,EAAE,IAAI;IACzB,CAAC,kCAAY,CAAC,OAAO,CAAC,EAAE,IAAI;IAC5B,CAAC,kCAAY,CAAC,IAAI,CAAC,EAAE,IAAI;I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AC;gBAClF,MAAM,cAAc,GAAG,sBAAS,CAAC,GAAG,CAAC,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACxF,MAAM,iBAAiB,GAAG,cAAc,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBAEpE,MAAM,aAAa,GAAG,sBAAS,CAAC,GAAG,CAAC,UAAU,CAAC,eAAe,EAAE,qBAAqB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;gBAC/G,MAAM,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;gBAC/F,kBAAkB,GAAG,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAE5D,mBAAmB,GAAG,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAChE,CAAC;YACD,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACrE,CAAC;QAED,OAAO;YACL,eAAe;YACf,aAAa;YACb,eAAe,EAAE,sBAAS,CAAC,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;SAC5E,CAAC;IACJ,CAAC;;AApFH,8CAqFC;AApFiB,mCAAiB,GAAG,IAAI,CAAC;AACzB,oCAAkB,GAAG,IAAI,CAAC;AAC1B,oCAAkB,GAAG,CAAC,CAAC;AACvB,0CAAwB,GAAG,GAAG,CAAC;AAC/B,iCAAe,GAAG,IAAI,CAAC;AACvB,2CAAyB,GAAG,GAAG,CAAC;AAChC,gDAA8B,GAAG,EAAE,CAAC;AACpC,6CAA2B,GAAG,EAAE,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -16,5 +16,7 @@ export { Limbo } from './games/limbo';
|
|
|
16
16
|
export { Keno, KenoRiskLevel } from './games/keno';
|
|
17
17
|
export { Hilo, HiloGuess } from './games/hilo';
|
|
18
18
|
export { CardGames, CardDetail, CardValue, Suits, suitsArr } from './games/cardGames';
|
|
19
|
+
export { AirdropCalculator, AirdropAllocationInfo } from './airdrop/airdrop-calculator';
|
|
19
20
|
export { BlackjackAction, Blackjack, InsuranceStatus, PerfectPairType, TwentyOnePlusThreeType, perfectPairPayout, twentyOnePlusThreePayout, HandOutcome, } from './games/blackjack';
|
|
20
21
|
export { formatSelectionName } from './utils/sports-name';
|
|
22
|
+
export { SportsContentWithFixturesInfo } from './utils/sports-content-fixture.types';
|
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.formatSelectionName = exports.HandOutcome = exports.twentyOnePlusThreePayout = exports.perfectPairPayout = exports.TwentyOnePlusThreeType = exports.PerfectPairType = exports.InsuranceStatus = exports.Blackjack = exports.BlackjackAction = exports.suitsArr = exports.Suits = exports.CardGames = exports.HiloGuess = exports.Hilo = exports.KenoRiskLevel = exports.Keno = exports.Limbo = exports.Crash = exports.PlinkoRiskLevel = exports.Plinko = exports.Mines = exports.Roulette = exports.DiceDirection = exports.Dice = exports.convertUuidToBs58 = exports.convertBs58ToUuid = exports.deriveBonusIssuances = exports.VipBonusIssuanceStatus = exports.DatesCalculator = exports.ChatMessageType = exports.getChatMessageLength = exports.CHAT_CHAR_LIMIT = exports.calculateEdgeMultiplier = exports.hexToBytes = void 0;
|
|
17
|
+
exports.SportsContentWithFixturesInfo = exports.formatSelectionName = exports.HandOutcome = exports.twentyOnePlusThreePayout = exports.perfectPairPayout = exports.TwentyOnePlusThreeType = exports.PerfectPairType = exports.InsuranceStatus = exports.Blackjack = exports.BlackjackAction = exports.AirdropCalculator = exports.suitsArr = exports.Suits = exports.CardGames = exports.HiloGuess = exports.Hilo = exports.KenoRiskLevel = exports.Keno = exports.Limbo = exports.Crash = exports.PlinkoRiskLevel = exports.Plinko = exports.Mines = exports.Roulette = exports.DiceDirection = exports.Dice = exports.convertUuidToBs58 = exports.convertBs58ToUuid = exports.deriveBonusIssuances = exports.VipBonusIssuanceStatus = exports.DatesCalculator = exports.ChatMessageType = exports.getChatMessageLength = exports.CHAT_CHAR_LIMIT = exports.calculateEdgeMultiplier = exports.hexToBytes = void 0;
|
|
18
18
|
__exportStar(require("./regex"), exports);
|
|
19
19
|
var hex_to_bytes_1 = require("./utils/hex-to-bytes");
|
|
20
20
|
Object.defineProperty(exports, "hexToBytes", { enumerable: true, get: function () { return hex_to_bytes_1.hexToBytes; } });
|
|
@@ -58,6 +58,8 @@ var cardGames_1 = require("./games/cardGames");
|
|
|
58
58
|
Object.defineProperty(exports, "CardGames", { enumerable: true, get: function () { return cardGames_1.CardGames; } });
|
|
59
59
|
Object.defineProperty(exports, "Suits", { enumerable: true, get: function () { return cardGames_1.Suits; } });
|
|
60
60
|
Object.defineProperty(exports, "suitsArr", { enumerable: true, get: function () { return cardGames_1.suitsArr; } });
|
|
61
|
+
var airdrop_calculator_1 = require("./airdrop/airdrop-calculator");
|
|
62
|
+
Object.defineProperty(exports, "AirdropCalculator", { enumerable: true, get: function () { return airdrop_calculator_1.AirdropCalculator; } });
|
|
61
63
|
var blackjack_1 = require("./games/blackjack");
|
|
62
64
|
Object.defineProperty(exports, "BlackjackAction", { enumerable: true, get: function () { return blackjack_1.BlackjackAction; } });
|
|
63
65
|
Object.defineProperty(exports, "Blackjack", { enumerable: true, get: function () { return blackjack_1.Blackjack; } });
|
|
@@ -69,4 +71,6 @@ Object.defineProperty(exports, "twentyOnePlusThreePayout", { enumerable: true, g
|
|
|
69
71
|
Object.defineProperty(exports, "HandOutcome", { enumerable: true, get: function () { return blackjack_1.HandOutcome; } });
|
|
70
72
|
var sports_name_1 = require("./utils/sports-name");
|
|
71
73
|
Object.defineProperty(exports, "formatSelectionName", { enumerable: true, get: function () { return sports_name_1.formatSelectionName; } });
|
|
74
|
+
var sports_content_fixture_types_1 = require("./utils/sports-content-fixture.types");
|
|
75
|
+
Object.defineProperty(exports, "SportsContentWithFixturesInfo", { enumerable: true, get: function () { return sports_content_fixture_types_1.SportsContentWithFixturesInfo; } });
|
|
72
76
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AAExB,qDAAkD;AAAzC,0GAAA,UAAU,OAAA;AACnB,qCAAuD;AAA9C,+GAAA,uBAAuB,OAAA;AAChC,qEAAqF;AAA5E,uHAAA,eAAe,OAAA;AAAE,4HAAA,oBAAoB,OAAA;AAC9C,+DAAyE;AAAhE,oHAAA,eAAe,OAAA;AACxB,6DAA2D;AAAlD,mHAAA,eAAe,OAAA;AACxB,yDAAgE;AAAvD,wHAAA,sBAAsB,OAAA;AAC/B,6DAAgE;AAAvD,wHAAA,oBAAoB,OAAA;AAC7B,yDAA8E;AAArE,mHAAA,iBAAiB,OAAA;AAAE,mHAAA,iBAAiB,OAAA;AAC7C,qCAAmD;AAA1C,4FAAA,IAAI,OAAA;AAAE,qGAAA,aAAa,OAAA;AAC5B,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AACjB,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,yCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,yGAAA,eAAe,OAAA;AAChC,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,qCAAmD;AAA1C,4FAAA,IAAI,OAAA;AAAE,qGAAA,aAAa,OAAA;AAC5B,qCAA+C;AAAtC,4FAAA,IAAI,OAAA;AAAE,iGAAA,SAAS,OAAA;AACxB,+CAAsF;AAA7E,sGAAA,SA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AE,iGAAA,SAAS,OAAA;AACxB,+CAAsF;AAA7E,sGAAA,SAAS,OAAA;AAAyB,kGAAA,KAAK,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAC1D,mEAAwF;AAA/E,uHAAA,iBAAiB,OAAA;AAC1B,+CAS2B;AARzB,4GAAA,eAAe,OAAA;AACf,sGAAA,SAAS,OAAA;AACT,4GAAA,eAAe,OAAA;AACf,4GAAA,eAAe,OAAA;AACf,mHAAA,sBAAsB,OAAA;AACtB,8GAAA,iBAAiB,OAAA;AACjB,qHAAA,wBAAwB,OAAA;AACxB,wGAAA,WAAW,OAAA;AAEb,mDAA0D;AAAjD,kHAAA,mBAAmB,OAAA;AAC5B,qFAAqF;AAA5E,6IAAA,6BAA6B,OAAA"}
|
package/lib/regex/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.US_PHONE_NUMBER_REGEX = exports.VALID_NAME_REGEX = exports.ADDRESS_URL_REGEX = exports.TXN_URL_REGEX = exports.TIMEZONE_OFFSET_REGEX = exports.MENTIONED_USER_REGEX = exports.HEX_COLOR_CODE_REGEX = exports.CAMPAIGN_CODE_REGEX = exports.PROMOTION_CODE_REGEX = exports.USERNAME_REGEX = exports.PWD_REGEX = void 0;
|
|
4
|
-
exports.PWD_REGEX =
|
|
4
|
+
exports.PWD_REGEX = /^.{8,24}$/;
|
|
5
5
|
exports.USERNAME_REGEX = /^[a-z\d]{3,16}$/i;
|
|
6
6
|
exports.PROMOTION_CODE_REGEX = /^[A-Z_\-\d]{3,25}$/;
|
|
7
7
|
exports.CAMPAIGN_CODE_REGEX = /^[a-z\d_\-]{1,30}$/i;
|
package/lib/regex/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/regex/index.ts"],"names":[],"mappings":";;;AACa,QAAA,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/regex/index.ts"],"names":[],"mappings":";;;AACa,QAAA,SAAS,GAAG,WAAW,CAAC;AAExB,QAAA,cAAc,GAAG,kBAAkB,CAAC;AAEpC,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAE5C,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAE5C,QAAA,oBAAoB,GAAG,+BAA+B,CAAC;AAGvD,QAAA,oBAAoB,GAAG,2CAA2C,CAAC;AAEnE,QAAA,qBAAqB,GAAG,6CAA6C,CAAC;AAEtE,QAAA,aAAa,GAAG,0BAA0B,CAAC;AAE3C,QAAA,iBAAiB,GAAG,6BAA6B,CAAC;AAClD,QAAA,gBAAgB,GAAG,yCAAyC,CAAC;AAC7D,QAAA,qBAAqB,GAAG,aAAa,CAAC"}
|