We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16a71f3 commit 98155c5Copy full SHA for 98155c5
src/greet.ts
@@ -1,8 +1,10 @@
1
import { GreetOptions } from "./types.js";
2
3
+const boundConsoleLog = console.log.bind(console);
4
+
5
export function greet(options: GreetOptions | string) {
6
const {
- logger = console.log.bind(console),
7
+ logger = boundConsoleLog,
8
message,
9
times = 1,
10
} = typeof options === "string" ? { message: options } : options;
0 commit comments