9.0.0 • Published 4 years ago

get-stdin v9.0.0

Weekly downloads
18,559,816
License
MIT
Repository
github
Last release
4 years ago

get-stdin

Get stdin as a string or buffer

Install

$ npm install get-stdin

Usage

// example.js
import getStdin from 'get-stdin';

console.log(await getStdin());
//=> 'unicorns'
$ echo unicorns | node example.js
unicorns

API

Both methods returns a promise that is resolved when the end event fires on the stdin stream, indicating that there is no more data to be read.

getStdin()

Get stdin as a string.

In a TTY context, a promise that resolves to an empty string is returned.

getStdin.buffer()

Get stdin as a Buffer.

In a TTY context, a promise that resolves to an empty Buffer is returned.

Related


node-sass@microsoft/bf-qnamaker@huyhpham/rn-line@remote.it/serverlessarchetype-librarynode-sass-chokidar-wxssreact-native-bluetooth2killi8n-react-native-fast-imagetiny-npm-license@kroonprins/pipectl-corecn-luis-apisxdotjson-to-dot@vangware/jsep@icanpm/api-mastersnptsnpt-alfred-workflow@arisageha/react-lazyload@jas99/husky@oneplanetcrowd/developerssheepskin@applitools/kdeploy@zamiell/zamfmtglossolaliareact-native-template-rfbaseairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112magnet-scrape-cli@piyushmishra/critical@ntt_app/react-native-custom-notificationhtml-pug-converterreact-native-covid-sdkgql_din_mod@thebespokepixel/xo-tidyayaneserverless-fork-upload-iomutasi-bcasalut_gongjang_first_module@saeon/quick-formcthpb-plugin-socialjsonix-lexml-teste21extra-googletranslatelorem-computer@olivervorasai/sliderpanqibaoreact-native-printer-brothersuncoded-connectwilscannerxm-md2pdfnode-sass-win32-x64-n4-n5-binnode-sass-linux-win32-x64-n4-n5-binunblock-block-save-variables@infinitebrahmanuniverse/nolb-get-s@srmagura/npm-check-updates@saaspe/components@candidpartners/tf-rulesexpand-react-bridgeopea-bootstraapslack-postnpm-check-futuregraphql2use@everything-registry/sub-chunk-1753p149-tabletachyons-to-csstaketalktap-that-htmltapplinttailwind-vector-effecttailwind-templatetablemark-clitenon-cliterm-img-clisvgson-cliswagger-localswagger-codegen-axios-flowswagger-client-typegenterminal-image-clitest-iki-mini-apptea-test-threetea-test-twowinx-form-winxwhitespace-langweb-elements-iconsvz-clitoolswebchexdotjson-convertxml-getxiedaimalaxiedaimala-uploadxmlappendxm-md-pdfwunderlinexhtml2pugxhtml2slimsupercluster-googlemaps-adapter-clonesstar-github-cli
9.0.0

4 years ago

8.0.0

5 years ago

7.0.0

6 years ago

6.0.0

7 years ago

5.0.1

10 years ago

5.0.0

10 years ago

4.0.1

10 years ago

4.0.0

10 years ago

3.0.2

11 years ago

3.0.1

11 years ago

3.0.0

11 years ago

2.0.0

11 years ago

1.0.0

11 years ago

0.1.0

11 years ago