Skip to content

Commit 0631795

Browse files
committed
Change export to default for single function
1 parent 1f58d63 commit 0631795

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/brain-games.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import { getName } from '../src/cli.js';
3+
import getName from '../src/cli.js';
44

55
getName();
66
console.log('Welcome to the Brain Games!');

src/cli.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import readlineSync from 'readline-sync';
22

3-
export const getName = () => {
3+
const getName = () => {
44
const name = readlineSync.question('May I have your name? ');
55
console.log(`Hello, ${name}!`);
66
};
7+
8+
export default getName;

0 commit comments

Comments
 (0)