Skip to content

Commit 007c561

Browse files
committed
Meta tweaks
1 parent 7ddb55c commit 007c561

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const getStdin = require('get-stdin');
1919
(async () => {
2020
console.log(await getStdin());
2121
//=> 'unicorns'
22-
})
22+
})();
2323
```
2424

2525
```

test-real.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22
const getStdin = require('.');
33

4-
getStdin().then(data => {
5-
process.exit(data ? 0 : 1); // eslint-disable-line unicorn/no-process-exit
6-
});
4+
(async () => {
5+
const stdin = await getStdin();
6+
process.exit(stdin ? 0 : 1); // eslint-disable-line unicorn/no-process-exit
7+
})();

0 commit comments

Comments
 (0)