This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Install free GSAP * Remove paid GSAP tests * Remove paid GSAP plugins usage * Replace GSAP MorphSVG with flubber * Optimize interpolators * Simple transition without morph * Update dependencies * Update version
- Loading branch information
Showing
10 changed files
with
3,984 additions
and
3,760 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const cache = new Map<string, any>() | ||
|
||
export function useCache<T>(key: string, fn: () => T): T { | ||
if (cache.has(key)) { | ||
return cache.get(key) | ||
} | ||
const value = fn() | ||
cache.set(key, value) | ||
return value | ||
} |
Oops, something went wrong.