Skip to content

Commit

Permalink
test: log util
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Jun 2, 2024
1 parent 39507b8 commit 59bb4ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/debug.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import { writeSync } from 'node:fs';

export const log = (
...args: any[]
) => {
writeSync(1, `${JSON.stringify(args, null, 2)}\n\n`);
};

export const time = <T extends (...args: any[]) => unknown>(
name: string,
_function: T,
Expand Down

0 comments on commit 59bb4ed

Please sign in to comment.