summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-03-17 17:10:24 -0300
committerEuAndreh <eu@euandre.org>2024-03-17 17:10:24 -0300
commit4ecf01606fc9569d3934fffcfd3f669b488a2dd9 (patch)
tree2eaaafe902223f16e1176340f09f609e68b595d7 /src
parentsrc/hero.mjs: Use name of CWD as the default name of buildServer() (diff)
downloadpapod-4ecf01606fc9569d3934fffcfd3f669b488a2dd9.tar.gz
papod-4ecf01606fc9569d3934fffcfd3f669b488a2dd9.tar.xz
tests/js/hero.mjs: Add simple test for now()
Diffstat (limited to 'src')
-rw-r--r--src/hero.mjs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hero.mjs b/src/hero.mjs
index 2d1f5be..d97f028 100644
--- a/src/hero.mjs
+++ b/src/hero.mjs
@@ -29,7 +29,8 @@ export const logit = (writerFn, timestampFn, level, o) =>
...o,
}));
-const now = () => (new Date()).toISOString();
+export const now = () => (new Date()).toISOString();
+
export const makeLogger = ({
writerFn = console.error,
timestampFn = now,