UNPKG

@alinex/datastore

Version:

Read, work and write data structures from and to differents locations and formats.

20 lines 868 B
/// <reference types="node" /> import { URL } from 'url'; export declare type Parser = (parsedUri: URL, buffer: Buffer, options?: any) => Promise<any>; export declare type Formatter = (parsedUri: URL, data: any, options?: any) => Promise<Buffer>; export declare type Format = 'bson' | 'coffee' | 'cson' | 'csv' | 'html' | 'ini' | 'js' | 'json' | 'msgpack' | 'properties' | 'text' | 'binary' | 'toml' | 'xlsx' | 'xls' | 'xml' | 'yaml'; export interface Handler { parse: Parser; format: Formatter; } export declare const formats: string[]; export declare const parse: Parser; export declare const format: Formatter; export declare const cast: (obj: any, ...types: string[]) => any; declare const _default: { parse: Parser; format: Formatter; cast: (obj: any, ...types: string[]) => any; }; export default _default; //# sourceMappingURL=index.d.ts.map