diff options
| author | Adam Soltys <[email protected]> | 2024-10-10 16:05:15 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-10-10 16:05:15 -0700 |
| commit | 17656bfe7346bfb1c948e3c82d9960b5a795621f (patch) | |
| tree | 923a715595296fa959bd84ae13e7495ce448254e /lib/utils.ts | |
| parent | 0de0e3ba3719333f3884aeff26992adf1688c6ec (diff) | |
| download | coinos-server-17656bfe7346bfb1c948e3c82d9960b5a795621f.tar.gz coinos-server-17656bfe7346bfb1c948e3c82d9960b5a795621f.zip | |
follow counts
Diffstat (limited to 'lib/utils.ts')
| -rw-r--r-- | lib/utils.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/utils.ts b/lib/utils.ts index a805f343..7bcb4a3d 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -168,3 +168,14 @@ export function formatReceipt(items, currency) { } export let t = ({ language = "en" }) => locales[language]; + +export let time = (() => { + let count = 0, started = false; + return () => { + if (!started) { + console.time(''); + started = true; + } + console.timeLog('', ++count); + }; +})(); |
