mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	new number formatter
This commit is contained in:
		
							parent
							
								
									37849b17f1
								
							
						
					
					
						commit
						c412be8451
					
				| @ -93,12 +93,9 @@ function IsJsonString(str) { | ||||
| } | ||||
| 
 | ||||
| function convert(value) { | ||||
|   if (value >= 1000000) { | ||||
|     value = value / 1000000 + "M"; | ||||
|   } else if (value >= 1000) { | ||||
|     value = value / 1000 + "K"; | ||||
|   } | ||||
|   return value; | ||||
| return new Intl.NumberFormat('en-GB', {  | ||||
|     notation: "compact" | ||||
| }).format(value); | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley