UNPKG

@dpkit/file

Version:

Fast TypeScript data management framework built on top of the Data Package standard and Polars DataFrames

8 lines (6 loc) 265 B
import { buffer } from "node:stream/consumers" import { loadFileStream } from "../stream/index.ts" export async function loadFile(path: string, options?: { maxBytes?: number }) { const stream = await loadFileStream(path, options) return await buffer(stream) }