0.1.0 • Published 9 months ago

node-stream-io v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

StreamIO

StreamIO.js is a lightweight Node.js package that simplifies input/output stream redirection and handling from the command line.

Installation

You can install StreamIO.js using npm:

npm install stream-io

Usage

StreamIO.js provides a simple and intuitive way to manage input and output streams from the command line.

Basic Usage

node index.js --   # Output: Whatever you type followed by Enter
node index.js -    # Input: Type something and press Enter
node index.js ---  # Error: Whatever you type followed by Enter

Redirecting Input

You can redirect input from a file using the < operator:

node index.js -- < input.txt

Redirecting Output

You can redirect the output to a file using the > operator:

node index.js -- > output.txt

Piping Output

You can also pipe the output to another command using the | operator:

node index.js -- | wc -l

Combining Redirection and Piping

Combine redirection and piping as needed:

node index.js -- > output.txt | wc -l

Contributing

Contributions are welcome! If you find any issues or have suggestions, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.


0.1.0

9 months ago