image-asset-manager
Version:
A comprehensive image asset management tool for frontend projects
41 lines • 1.28 kB
TypeScript
/**
* Check if a file is a supported image format
*/
export declare function isSupportedImageFile(filePath: string): boolean;
/**
* Generate a unique ID for a file based on its path
*/
export declare function generateFileId(filePath: string): string;
/**
* Calculate file hash for duplicate detection
*/
export declare function calculateFileHash(buffer: Buffer): string;
/**
* Normalize file path for cross-platform compatibility
*/
export declare function normalizePath(filePath: string): string;
/**
* Get relative path from project root
*/
export declare function getRelativePath(filePath: string, projectRoot: string): string;
/**
* Extract category from file path
*/
export declare function extractCategory(filePath: string): string;
/**
* Format file size in human readable format
*/
export declare function formatFileSize(bytes: number): string;
/**
* Check if a pattern matches a file path
*/
export declare function matchesPattern(filePath: string, patterns: string[]): boolean;
/**
* Validate CLI options
*/
export declare function validatePort(port: number): boolean;
/**
* Get available port if the specified port is in use
*/
export declare function getAvailablePort(preferredPort: number): Promise<number>;
//# sourceMappingURL=index.d.ts.map