{"ScriptPreparationCode":"window.cache = new WeakMap();\r\n\r\nwindow.format = (locale, currency, value) =\u003E new Intl.NumberFormat(locale, { style: \u0027currency\u0027, currency }).format(value);\r\n\r\nwindow.memoizedFormat = (locale, currency, value) =\u003E {\r\n const key = [locale, currency];\r\n let formatter = window.cache.get(key);\r\n \r\n if (!formatter) {\r\n formatter = new Intl.NumberFormat(locale, { style: \u0027currency\u0027, currency });\r\n window.cache.set(key, formatter);\r\n }\r\n \r\n return formatter.format(value);\r\n};","TestCases":[{"Name":"new Intl.NumberFormat","Code":"window.format(\u0027pt-BR\u0027, \u0027BRL\u0027, 100_346_999.21);","IsDeferred":false},{"Name":"memoized instance","Code":"window.memoizedFormat(\u0027pt-BR\u0027, \u0027BRL\u0027, 100_346_999.21);","IsDeferred":false}]}