/// <reference types="node" />
import { ExecOptions } from 'child_process';
import { pipeline } from 'stream';
declare const objectConverter: (oldObject: any, keyConverter: (e: string) => string, valueConverter: (e: any) => any) => any;
declare function mapToJSON(map: Map<any, any>): any;
export declare function parseDurationToMs(duration: number | string): number;
export declare function parseBytes(value: string | number): number;
declare function sanitizeUrl(url: string): string;
declare function sanitizeHost(host: string, remoteScheme: string): string;
declare function isTestInstance(): boolean;
declare function isProdInstance(): boolean;
declare function getAppNumber(): string;
declare function peertubeTruncate(str: string, options: {
    length: number;
    separator?: RegExp;
    omission?: string;
}): string;
declare function pageToStartAndCount(page: number, itemsPerPage: number): {
    start: number;
    count: number;
};
declare type SemVersion = {
    major: number;
    minor: number;
    patch: number;
};
declare function parseSemVersion(s: string): SemVersion;
declare function execShell(command: string, options?: ExecOptions): Promise<{
    err?: Error;
    stdout: string;
    stderr: string;
}>;
declare function isOdd(num: number): boolean;
declare function toEven(num: number): number;
declare function promisify0<A>(func: (cb: (err: any, result: A) => void) => void): () => Promise<A>;
declare function promisify1<T, A>(func: (arg: T, cb: (err: any, result: A) => void) => void): (arg: T) => Promise<A>;
declare function promisify2<T, U, A>(func: (arg1: T, arg2: U, cb: (err: any, result: A) => void) => void): (arg1: T, arg2: U) => Promise<A>;
declare const randomBytesPromise: (arg: number) => Promise<Buffer>;
declare const createPrivateKey: (arg: number) => Promise<{
    key: string;
}>;
declare const getPublicKey: (arg: string) => Promise<{
    publicKey: string;
}>;
declare const execPromise2: (arg1: string, arg2: any) => Promise<string>;
declare const execPromise: (arg: string) => Promise<string>;
declare const pipelinePromise: typeof pipeline.__promisify__;
export { isTestInstance, isProdInstance, getAppNumber, objectConverter, mapToJSON, sanitizeUrl, sanitizeHost, execShell, pageToStartAndCount, peertubeTruncate, promisify0, promisify1, promisify2, randomBytesPromise, createPrivateKey, getPublicKey, execPromise2, execPromise, pipelinePromise, parseSemVersion, isOdd, toEven };
//# sourceMappingURL=core-utils.d.ts.map