Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/aviate-labs/io.mo

I/O Primitives for Motoko
https://github.com/aviate-labs/io.mo

Last synced: about 2 months ago
JSON representation

I/O Primitives for Motoko

Lists

README

        

# Basic Interfaces for I/O Primitives

## Usage

```motoko
let data = Iter.fromArray(Blob.toArray(Text.encodeUtf8(
"Text or something else that can be converted to bytes.",
)));

let reader = IO.fromIter(data);
switch (IO.readAll(reader)) {
case (#ok(bs)) // [...].size() == 54.
...
};
```