-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): revert export to not use default (#481)
* fix(react): revert export to not use default * remove unneeded interface * Update packages/react/cache.ts Co-authored-by: Michael <me@michaelsiek.com> * Update packages/react/index.ts Co-authored-by: Michael <me@michaelsiek.com> Co-authored-by: Michael <me@michaelsiek.com>
- Loading branch information
1 parent
3ac892a
commit d932c9d
Showing
3 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const _cache: { [key: string]: string } = {}; | ||
|
||
const cache = { | ||
set(key: string, value: string): void { | ||
_cache[key] = value; | ||
}, | ||
get(key: string): string { | ||
return _cache[key]; | ||
}, | ||
clear(): void { | ||
Object.keys(_cache).forEach(key => { | ||
delete _cache[key]; | ||
}); | ||
} | ||
}; | ||
|
||
export default cache; |
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
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