md-curcuma
Version:
A Typescript library for transporting and converting markdown and other data.
28 lines (27 loc) • 1.27 kB
TypeScript
import { Observable, Observer_Interface, Observer_Props, Observer_Type } from "../core/observer";
import * as fs from "fs";
import { URL } from "url";
import { IO_Interface } from "./types";
export interface CSV_IO_Props_Interface {
readPath: string;
writePath: string;
csvSeparator: string;
}
export declare class CSV_IO<D> implements IO_Interface<D>, Observable<D> {
private observer_subject;
private props;
constructor(props: CSV_IO_Props_Interface);
add_observer(observer: Observer_Interface<D>, id: Observer_Type): void;
notify_all(props: Observer_Props<D>): void;
notify(props: Observer_Props<D>): void;
read(): void;
write(dao: D): void;
static transform_to_json(job_parameter: CSV_IO_Props_Interface): void;
static download_all_images_from_json(source_file: string, target_folder: string, url_property_name: string): void;
static download_image(url: string, filepath: fs.PathLike): Promise<unknown>;
static is_valid_url_protocol(url: string): boolean;
static is_valid_url(url: string): boolean;
static trim_char(str: string, ch: string): string;
static cleanup(str: string): string;
static imageToBase64(url: string | URL | Request, callback: (arg0: string | ArrayBuffer) => void): void;
}