We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ddb55c commit 007c561Copy full SHA for 007c561
2 files changed
readme.md
@@ -19,7 +19,7 @@ const getStdin = require('get-stdin');
19
(async () => {
20
console.log(await getStdin());
21
//=> 'unicorns'
22
-})
+})();
23
```
24
25
test-real.js
@@ -1,6 +1,7 @@
1
'use strict';
2
const getStdin = require('.');
3
4
-getStdin().then(data => {
5
- process.exit(data ? 0 : 1); // eslint-disable-line unicorn/no-process-exit
6
-});
+(async () => {
+ const stdin = await getStdin();
+ process.exit(stdin ? 0 : 1); // eslint-disable-line unicorn/no-process-exit
7
0 commit comments