https://github.com/Olian04/gleam_stdin
This package provides a synchronous iterator for consuming stdin. It supports all the non-browser targets, Erlang, Node, Deno, and Bun.
https://github.com/Olian04/gleam_stdin
bun deno erlang gleam gleam-lang gleam-language nodejs stdin stdio
Last synced: 5 months ago
JSON representation
This package provides a synchronous iterator for consuming stdin. It supports all the non-browser targets, Erlang, Node, Deno, and Bun.
- Host: GitHub
- URL: https://github.com/Olian04/gleam_stdin
- Owner: Olian04
- Created: 2024-06-03T08:05:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-11T15:09:15.000Z (over 1 year ago)
- Last Synced: 2024-11-14T02:05:05.292Z (11 months ago)
- Topics: bun, deno, erlang, gleam, gleam-lang, gleam-language, nodejs, stdin, stdio
- Language: JavaScript
- Homepage: https://hex.pm/packages/stdin
- Size: 7.81 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-gleam - stdin - [📚](https://hexdocs.pm/stdin/) - Provides a synchronous iterator for consuming stdin. It supports all the non-browser targets, Erlang, Node, Deno, and Bun. (Packages / Command Line)
README
[](https://hex.pm/packages/stdin)
[](https://hexdocs.pm/stdin/)# stdin
`stdin` provides a synchronous iterator for consuming stdin. It supports all the non-browser targets, Erlang, Node, Deno, and Bun.
The goal of this package is to provide a uniform way of consuming stdin for all supported targets on all supported platforms.
| Platform | Tested version | Date |
|:------------:|:-------------:|:------------:|
| Windows 10 | 2.0.0 | `2025-01-02` |
| macOS 15.2 | 2.0.0 | `2025-01-02` |
| Ubuntu 24.04 | 2.0.0 | `2025-01-02` |
| Fedora 40 | 2.0.0 | `2025-01-02` |```sh
gleam add stdin
``````gleam
import gleam/io
import gleam/yielder
import stdinpub fn main() {
stdin.read_lines()
|> yielder.to_list
|> io.debug
}```
Further documentation can be found at .
## Development
```sh
./run_test.sh
```