This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useCallback} from 'react'; | |
import {millify} from '../millify'; | |
import {useAppLanguage} from './use-app-language'; | |
const cachedFormatters = new Map<string, Intl.NumberFormat>(); | |
const cachedResults = new Map<Intl.NumberFormat, Map<number, string>>(); | |
/** | |
* We cache Intl.NumberFormat instances because creating them is slow. |
OlderNewer