summaryrefslogtreecommitdiff
path: root/node_modules/get-stdin/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/get-stdin/index.js')
-rw-r--r--node_modules/get-stdin/index.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/node_modules/get-stdin/index.js b/node_modules/get-stdin/index.js
deleted file mode 100644
index e8182da3..00000000
--- a/node_modules/get-stdin/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-const {stdin} = process;
-
-export default async function getStdin() {
- let result = '';
-
- if (stdin.isTTY) {
- return result;
- }
-
- stdin.setEncoding('utf8');
-
- for await (const chunk of stdin) {
- result += chunk;
- }
-
- return result;
-}
-
-getStdin.buffer = async () => {
- const result = [];
- let length = 0;
-
- if (stdin.isTTY) {
- return Buffer.concat([]);
- }
-
- for await (const chunk of stdin) {
- result.push(chunk);
- length += chunk.length;
- }
-
- return Buffer.concat(result, length);
-};