// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/** Reads and writes comma-separated values (CSV) files.
 *
 * There are many kinds of CSV files; this module supports the format described
 * in {@link https://www.rfc-editor.org/rfc/rfc4180.html | RFC 4180}.
 *
 * A csv file contains zero or more records of one or more fields per record.
 * Each record is separated by the newline character. The final record may
 * optionally be followed by a newline character.
 *
 * ```csv
 * field1,field2,field3
 * ```
 *
 * White space is considered part of a field.
 *
 * Carriage returns before newline characters are silently removed.
 *
 * Blank lines are ignored. A line with only whitespace characters (excluding
 * the ending newline character) is not considered a blank line.
 *
 * Fields which start and stop with the quote character " are called
 * quoted-fields. The beginning and ending quote are not part of the field.
 *
 * The source:
 *
 * ```csv
 * normal string,"quoted-field"
 * ```
 *
 * results in the fields
 *
 * ```ts no-assert
 * [`normal string`, `quoted-field`]
 * ```
 *
 * Within a quoted-field a quote character followed by a second quote character is considered a single quote.
 *
 * ```csv
 * "the ""word"" is true","a ""quoted-field"""
 * ```
 *
 * results in
 *
 * [`the "word" is true`, `a "quoted-field"`]
 *
 * Newlines and commas may be included in a quoted-field
 *
 * ```csv
 * "Multi-line
 * field","comma is ,"
 * ```
 *
 * results in
 *
 * ```ts no-assert
 * [`Multi-line
 * field`, `comma is ,`]
 * ```
 *
 * @module
 */

export * from "./stringify.ts";
export * from "./parse.ts";
export * from "./csv_parse_stream.ts";
export * from "./csv_stringify_stream.ts";

// denoCacheMetadata={"headers":{"set-cookie":"__cf_bm=9FFlxrpt_LJ_Mlf5EJT4Ps9EiF53zGrDFh8Deelyt.g-1785241874.9317436-1.0.1.1-VJpFdUMwVT8qbHFXPggJbs1sgA3Vz.vlrrJdKYiuVhg9iNwTQp6NOD3guw3Ueu0sIKjL3YaitFPDF7rjGGF9jEPZzrikM4R_Iqa25__Ps4.P0SJPJaE9St1Y.rldCKu2; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","alt-svc":"h3=\":443\"; ma=86400","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","cross-origin-resource-policy":"cross-origin","content-type":"text/typescript","x-content-type-options":"nosniff","etag":"\"4f22331002b6414744a9d3249ca07c8d\"","date":"Tue, 28 Jul 2026 12:31:15 GMT","vary":"Origin","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=7%2F0LJtanSITHMHveixIFqNGSFG8%2B98QoDCwZ0zVzXYGt5WT7eSTgTCzNQNmNXrBRiC4M0KpZRvHjNSruZ80HOIhUoBOW500VZoDhVdqHN6ORZM2PoTr0juc%3D\"}]}","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","cache-control":"public, max-age=31536000, immutable","access-control-expose-headers":"*","cf-ray":"a223e6564e847db6-LAX","access-control-allow-origin":"*","x-jsr-backend":"modules","content-length":"1764","server":"cloudflare","x-robots-tag":"noindex"},"url":"https://jsr.io/@std/csv/0.224.3/mod.ts","time":1785241875}