UNPKG

node-darts

Version:

Node.js Native Addon for Darts (Double-ARray Trie System)

36 lines (35 loc) 1.09 kB
/** * Checks if a file exists * @param filePath file path * @returns true if the file exists, false otherwise */ export declare function fileExists(filePath: string): boolean; /** * Validates a file path * @param filePath file path * @throws {FileNotFoundError} if the file is not found */ export declare function validateFilePath(filePath: string): void; /** * Creates a directory if it doesn't exist * @param dirPath directory path */ export declare function ensureDirectoryExists(dirPath: string): void; /** * Sorts an array of strings * @param arr array to sort * @returns a new sorted array */ export declare function sortStrings(arr: string[]): string[]; /** * Removes duplicates from an array * @param arr array to remove duplicates from * @returns a new array with duplicates removed */ export declare function uniqueArray<T>(arr: T[]): T[]; /** * Sorts an array of strings and removes duplicates * @param arr array to process * @returns a new sorted array with duplicates removed */ export declare function sortAndUniqueStrings(arr: string[]): string[];