@types/json2csv

  • Version 5.0.7
  • Published
  • 12.1 kB
  • 1 dependency
  • MIT license

Install

npm i @types/json2csv
yarn add @types/json2csv
pnpm add @types/json2csv

Overview

TypeScript definitions for json2csv

Index

Variables

variable transforms

const transforms: { flatten: typeof flatten; unwind: typeof unwind };

    Functions

    function parse

    parse: <T>(
    data: Readonly<T> | readonly T[],
    opts?: json2csv.Options<T>
    ) => string;

      function parseAsync

      parseAsync: <T>(
      data: Readonly<T> | readonly T[] | Readable,
      opts?: json2csv.Options<T>,
      transformOpts?: TransformOptions
      ) => Promise<string>;

        Interfaces

        interface FieldInfo

        interface FieldInfo<T> {}

          property default

          default?: string | undefined;

            property label

            label?: string | undefined;

              property value

              value: string | FieldValueCallback<T>;

                interface FieldValueCallbackInfo

                interface FieldValueCallbackInfo {}

                  property default

                  default?: string | undefined;

                    property label

                    label: string;

                      interface FieldValueCallbackWithField

                      interface FieldValueCallbackWithField<T> {}

                        call signature

                        (row: T, field: FieldValueCallbackInfo): any;

                          interface FieldValueCallbackWithoutField

                          interface FieldValueCallbackWithoutField<T> {}

                            call signature

                            (row: T): any;

                              interface FlattenOptions

                              interface FlattenOptions {}

                                property arrays

                                arrays?: boolean | undefined;

                                  property objects

                                  objects?: boolean | undefined;

                                    property separator

                                    separator?: string | undefined;

                                      interface NormalizedFieldInfo

                                      interface NormalizedFieldInfo<T> {}

                                        property label

                                        label: string;

                                          property value

                                          value: FieldValueCallback<T>;

                                            interface Options

                                            interface Options<T> {}

                                              property defaultValue

                                              defaultValue?: string | undefined;

                                                property delimiter

                                                delimiter?: string | undefined;

                                                  property eol

                                                  eol?: string | undefined;

                                                    property escapedQuote

                                                    escapedQuote?: string | undefined;

                                                      property excelStrings

                                                      excelStrings?: boolean | undefined;

                                                        property fields

                                                        fields?: Array<string | FieldInfo<T>> | undefined;

                                                          property header

                                                          header?: boolean | undefined;

                                                            property includeEmptyRows

                                                            includeEmptyRows?: boolean | undefined;

                                                              property ndjson

                                                              ndjson?: boolean | undefined;

                                                                property quote

                                                                quote?: string | undefined;

                                                                  property transforms

                                                                  transforms?: Array<Json2CsvTransform<any, any>> | undefined;

                                                                    property withBOM

                                                                    withBOM?: boolean | undefined;

                                                                      interface UnwindOptions

                                                                      interface UnwindOptions {}

                                                                        property blankOut

                                                                        blankOut?: boolean | undefined;

                                                                          property paths

                                                                          paths?: string[] | undefined;

                                                                            Type Aliases

                                                                            type FieldValueCallback

                                                                            type FieldValueCallback<T> =
                                                                            | FieldValueCallbackWithoutField<T>
                                                                            | FieldValueCallbackWithField<T>;

                                                                              type Json2CsvTransform

                                                                              type Json2CsvTransform<T1, T2> = (item: T1) => T2 | T2[];

                                                                                Package Files (1)

                                                                                Dependencies (1)

                                                                                Dev Dependencies (0)

                                                                                No dev dependencies.

                                                                                Peer Dependencies (0)

                                                                                No peer dependencies.

                                                                                Badge

                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/json2csv.

                                                                                • Markdown
                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/json2csv)
                                                                                • HTML
                                                                                  <a href="https://www.jsdocs.io/package/@types/json2csv"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>