Skip to main content
Home

@std/csv@0.215.0

latest
It is unknown whether this package works with Node.js, Deno, Browsers, Cloudflare Workers, Bun
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score
70%
Published
a year ago (0.215.0)
class CsvStringifyStream
extends TransformStream<TOptions["columns"] extends Array<string> ? Record<string, unknown> : Array<unknown>, string>

Convert each chunk to a CSV record.

Examples

Example 1

import { CsvStringifyStream } from "@std/csv/csv_stringify_stream";

const file = await Deno.open("data.csv", { create: true, write: true });
const readable = ReadableStream.from([
  { id: 1, name: "one" },
  { id: 2, name: "two" },
  { id: 3, name: "three" },
]);

await readable
  .pipeThrough(new CsvStringifyStream({ columns: ["id", "name"] }))
  .pipeThrough(new TextEncoderStream())
  .pipeTo(file.writable);

Constructors

new
CsvStringifyStream(options?: TOptions)

Construct a new instance.

Type Parameters

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/csv

Import symbol

import { CsvStringifyStream } from "@std/csv/csv_stringify_stream";
or

Import directly with a jsr specifier

import { CsvStringifyStream } from "jsr:@std/csv/csv_stringify_stream";

Add Package

pnpm i jsr:@std/csv
or (using pnpm 10.8 or older)
pnpm dlx jsr add @std/csv

Import symbol

import { CsvStringifyStream } from "@std/csv/csv_stringify_stream";

Add Package

yarn add jsr:@std/csv
or (using Yarn 4.8 or older)
yarn dlx jsr add @std/csv

Import symbol

import { CsvStringifyStream } from "@std/csv/csv_stringify_stream";

Add Package

npx jsr add @std/csv

Import symbol

import { CsvStringifyStream } from "@std/csv/csv_stringify_stream";

Add Package

bunx jsr add @std/csv

Import symbol

import { CsvStringifyStream } from "@std/csv/csv_stringify_stream";