arx-convert
Version:
Converts various Arx Fatalis formats to JSON or YAML and back
19 lines (18 loc) • 1.14 kB
TypeScript
import { type SupportedArxFormat, type SupportedDataFormat, type SupportedFormat } from './constants.js';
export declare function getPackageVersion(): Promise<string>;
export declare function streamToBuffer(input: NodeJS.ReadableStream): Promise<ArrayBuffer>;
export declare function stringifyJSON(json: any, prettify?: boolean): string;
export declare function stringifyYAML(json: any): Promise<string>;
/**
* @example
* ```js
* quotientAndRemainder(20, 3) -> [6, 2]
* ```
*/
export declare function quotientAndRemainder(dividend: number, divisor: number): [number, number];
export declare function outputInChunks(buffer: string | ArrayBuffer, stream: NodeJS.WritableStream, chunkSize?: number): void;
export declare function isValidFormat(arg: string): arg is SupportedFormat;
export declare function isArxFormat(arg: SupportedFormat): arg is SupportedArxFormat;
export declare function isDataFormat(arg: SupportedFormat): arg is SupportedDataFormat;
export declare function getInputStream(filename?: string): Promise<NodeJS.ReadableStream>;
export declare function getOutputStream(filename?: string): Promise<NodeJS.WritableStream>;