made with esnextbin
made with esnextbin
made with esnextbin
made with esnextbin
made with esnextbin
made with esnextbin
made with esnextbin
This file contains 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
export function mockLocalStorage(map?: Map<string, string>): Storage { | |
return new Proxy(new MockStorage(map), { get, set }) as MockedStorage | |
} | |
type MockedStorage = | |
MockStorage & | |
{ [index: number]: string } & | |
{ [key: string]: string } | |
class MockStorage { |
made with esnextbin
made with esnextbin