JSON import support
+ JSON import added + code structure refactored
This commit is contained in:
10
types/csv.ts
10
types/csv.ts
@ -6,9 +6,9 @@ import { CommonCSVReaderOptions } from "https://deno.land/x/csv@v0.8.0/reader.ts
|
||||
export type ParserOptions = Partial<CommonCSVReaderOptions>;
|
||||
|
||||
/**
|
||||
* Raw row object with string properties returned by `csv.readCSVObjects`.
|
||||
* Raw CSV row returned by `csv.readCSVObjects`.
|
||||
*/
|
||||
export type RawRow = {
|
||||
export type RawCsvRow = {
|
||||
[key: string]: string;
|
||||
};
|
||||
|
||||
@ -19,3 +19,9 @@ export type ParsedRow = {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export type CsvOptions = {
|
||||
delimiter: string;
|
||||
lf: boolean;
|
||||
quote: string;
|
||||
};
|
||||
|
7
types/json.ts
Normal file
7
types/json.ts
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Raw JSON object returned by `JSON.parse`.
|
||||
*/
|
||||
export type RawJsonRow = {
|
||||
// deno-lint-ignore no-explicit-any
|
||||
[key: string]: any;
|
||||
};
|
Reference in New Issue
Block a user