Merged in chore/migrate-from-next-lint (pull request #3263)
chore: Migrate from next lint to eslint * Migrate scandic-web * Migrate partner-sas * Enable any rule in partner-sas Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -7,10 +7,6 @@ function base64ToUint8Array(base64String: string) {
|
||||
return byteArray
|
||||
}
|
||||
|
||||
function utf8ToUint8Array(utf8String: string) {
|
||||
return new TextEncoder().encode(utf8String)
|
||||
}
|
||||
|
||||
function uint8ArrayToUtf8(uint8Array: Uint8Array) {
|
||||
return new TextDecoder().decode(uint8Array)
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import { cache as reactCache } from "react"
|
||||
*
|
||||
* @param fn - The function to memoize
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function cache<T extends (...args: any[]) => any>(fn: T) {
|
||||
const cachedFunction = reactCache((stringifiedParams: string) => {
|
||||
return fn(...JSON.parse(stringifiedParams))
|
||||
|
||||
Reference in New Issue
Block a user