New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-stdin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-stdin

Get stdin as a string or buffer

9.0.0
latest
Source
npm
Version published
Weekly downloads
12M
-19.62%
Maintainers
1
Weekly downloads
 
Created

What is get-stdin?

The get-stdin package is a simple utility that allows you to easily read stdin as a string or buffer in Node.js. It's useful for command-line tools that need to process input piped to them from the command line.

What are get-stdin's main functionalities?

Read stdin as a string

This feature allows you to read the standard input (stdin) as a string. It returns a promise that resolves with the entire input when the stdin stream ends.

const getStdin = require('get-stdin');

getStdin().then(input => {
  console.log(input);
});

Read stdin as a buffer

This feature allows you to read the standard input (stdin) as a buffer. It returns a promise that resolves with the entire input as a buffer when the stdin stream ends.

const getStdin = require('get-stdin');

getStdin.buffer().then(input => {
  console.log(input);
});

Other packages similar to get-stdin

Keywords

std

FAQs

Package last updated on 16 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts