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

x/bid/deps.ts>parse

build IME dictionary
Latest
function parse
import { parse } from "https://deno.land/x/bid@v1.0.3/deps.ts";

Csv parse helper to manipulate data. Provides an auto/custom mapper for columns.

Examples

Example 1

import { parse } from "https://deno.land/std@0.224.0/csv/parse.ts";
const string = "a,b,c\nd,e,f";

console.log(
  await parse(string, {
    skipFirstRow: false,
  }),
);
// output:
// [["a", "b", "c"], ["d", "e", "f"]]

Parameters

input: string

Input to parse.

optional
opt: undefined

options of the parser.

Returns

string[][]

If you don't provide opt.skipFirstRow and opt.columns, it returns string[][]. If you provide opt.skipFirstRow or opt.columns, it returns Record<string, unknown>[].

Type Parameters

T extends ParseOptions

Parameters

input: string
opt: T

Returns

ParseResult<ParseOptions, T>