Coder Social home page Coder Social logo

read-file-stdin's Introduction

read-file-stdin

Read from a file, falling back to stdin.

Installation

$ npm install read-file-stdin

API

read ([file], callback)

Read from a file, falling back to stdin, and callback(err, buffer).

License

MIT

read-file-stdin's People

Contributors

damianbaar avatar dominicbarnes avatar ianstormtaylor avatar trysound avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

damianbaar mk-pmb

read-file-stdin's Issues

Add option for stdin TTY hint

I like to announce a message like "I: now reading from stdin." when my programs are ready to read from stdin and it is a TTY, so in case of accidential missing filename, users never think the program hangs, but instead immediately see that their invocation went wrong.

Could you add an option stdinTtyHint that can accept a string to be printed to stderr, or a function to be called as soon as the pipe is set up?

An options object could be passed in the first slot instead of a filename, and the filename taken from the filename option. If you like the idea, I could make a PR for it.

Package size & version

The package is pretty big because it includes the 'test' directory, this has been fixed but never got published to NPM. Could you publish it?

While you are publishing it would be a good idea to bump the version to 1.0.0 since this package isn't in any kind of experimental state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.