0.1.0 • Published 2 years ago
node-stream-io v0.1.0
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-ioUsage
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 EnterRedirecting Input
You can redirect input from a file using the < operator:
node index.js -- < input.txtRedirecting Output
You can redirect the output to a file using the > operator:
node index.js -- > output.txtPiping Output
You can also pipe the output to another command using the | operator:
node index.js -- | wc -lCombining Redirection and Piping
Combine redirection and piping as needed:
node index.js -- > output.txt | wc -lContributing
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
2 years ago