Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package Version Hex Docs

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.5 2.0.2 2025-05-22
Ubuntu 24.04 2.0.2 2025-05-26
Fedora 40 2.0.2 2025-05-26
gleam add stdin
import gleam/io
import gleam/yielder
import stdin

pub fn main() {
  stdin.read_lines()
  |> yielder.to_list
  |> echo
}

Further documentation can be found at https://hexdocs.pm/stdin.

Development

./run_test.sh

About

A synchronous stdin iterator for Gleam, with uniform behavior across Erlang, Node, Deno, and Bun.

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages