@shockpkg/ria-packager
Version:
Package for creating Adobe AIR packages
58 lines (57 loc) • 1.71 kB
TypeScript
/**
* Trim dot flash from head of path.
*
* @param path Path string.
* @returns Trimmed path.
*/
export declare function trimDotSlash(path: string): string;
/**
* Find path relative from base, if base matches.
*
* @param path Path to match against.
* @param start Search start.
* @param nocase Match case-insensitive.
* @returns Returns path, or null.
*/
export declare function pathRelativeBase(path: string, start: string, nocase?: boolean): string | null;
/**
* Same as pathRelativeBase, but retuns true on a match, else false.
*
* @param path Path to match against.
* @param start Search start.
* @param nocase Match case-insensitive.
* @returns Returns true on match, else false.
*/
export declare function pathRelativeBaseMatch(path: string, start: string, nocase?: boolean): boolean;
/**
* Align integer.
*
* @param i Integer value.
* @param align Alignment amount.
* @returns Aligned integer.
*/
export declare function align(i: number, align: number): number;
/**
* Quote string for SH.
*
* @param str String to be quoted.
* @returns Quoted string.
*/
export declare function quoteSh(str: string): string;
/**
* Quote string for CMD.
*
* @param str String to be quoted.
* @returns Quoted string.
*/
export declare function quoteCmd(str: string): string;
/**
* Resize RGBA image data down by exactly half.
* Input dimensions must be a power of 2, else error is thrown.
* If resizing multiple steps, each step dimensions must be a power of 2.
*
* @param png PNG data.
* @param x Number of times to resize down by half.
* @returns PNG data.
*/
export declare function pngHalfSize(png: Readonly<Uint8Array>, x?: number): Promise<Uint8Array<ArrayBufferLike>>;