mirror of
				https://github.com/MHSanaei/3x-ui.git
				synced 2025-10-29 19:32:51 +00:00 
			
		
		
		
	chore: revert change in this branch
This commit is contained in:
		
							parent
							
								
									a059127c07
								
							
						
					
					
						commit
						25d00b5710
					
				
					 1 changed files with 5 additions and 12 deletions
				
			
		|  | @ -81,19 +81,12 @@ class PromiseUtil { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| class RandomUtil { | class RandomUtil { | ||||||
|     static getSeq({ type = "default", hasNumbers = true, hasLowercase = true, hasUppercase = true } = {}) { |     static getSeq({ hasNumbers = true, hasLowercase = true, hasUppercase = true } = {}) { | ||||||
|         let seq = ''; |         let seq = ''; | ||||||
|          |          | ||||||
|         switch (type) { |  | ||||||
|             case "hex": |  | ||||||
|                 seq += "0123456789abcdef"; |  | ||||||
|                 break; |  | ||||||
|             default: |  | ||||||
|         if (hasNumbers) seq += "0123456789"; |         if (hasNumbers) seq += "0123456789"; | ||||||
|         if (hasLowercase) seq += "abcdefghijklmnopqrstuvwxyz"; |         if (hasLowercase) seq += "abcdefghijklmnopqrstuvwxyz"; | ||||||
|         if (hasUppercase) seq += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; |         if (hasUppercase) seq += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ||||||
|                 break; |  | ||||||
|         } |  | ||||||
| 
 | 
 | ||||||
|         return seq; |         return seq; | ||||||
|     } |     } | ||||||
|  | @ -116,7 +109,7 @@ class RandomUtil { | ||||||
|     static randomShortIds() { |     static randomShortIds() { | ||||||
|         const lengths = [2, 4, 6, 8, 10, 12, 14, 16].sort(() => Math.random() - 0.5); |         const lengths = [2, 4, 6, 8, 10, 12, 14, 16].sort(() => Math.random() - 0.5); | ||||||
| 
 | 
 | ||||||
|         return lengths.map(len => this.randomSeq(len, { type: "hex" })).join(','); |         return lengths.map(len => this.randomSeq(len)).join(','); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     static randomLowerAndNum(len) { |     static randomLowerAndNum(len) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Shishkevich D.
						Shishkevich D.