mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Refactor
This commit is contained in:
		
							parent
							
								
									a2fcae4383
								
							
						
					
					
						commit
						f46f53b8a3
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -13,11 +13,11 @@ function getTime(time: number) {
 | 
			
		|||
	return time.toString(36).padStart(8, '0');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getRandom() {
 | 
			
		||||
function getNoise() {
 | 
			
		||||
	return counter.toString(36).padStart(2, '0').slice(-2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function genAid(date: Date): string {
 | 
			
		||||
	counter++;
 | 
			
		||||
	return getTime(date.getTime()) + getRandom();
 | 
			
		||||
	return getTime(date.getTime()) + getNoise();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue