Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/reader.js>readAsArray

A JavaScript extension package for building strong and modern applications.
Latest
function readAsArray
import { readAsArray } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/reader.js";

Reads all data from the iterable object or readable stream to an array.

Examples

Example 1

import { readAsArray } from "@ayonli/jsext/reader";
import * as fs from "node:fs";

const file = fs.createReadStream("./package.json");
const chunks = await readAsArray(file);

console.log(chunks);