UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

63 lines (62 loc) • 2.04 kB
/** * Language Detection Map * Maps file extensions and filenames to programming language names * * @module processors/config/languageMap */ /** * Maps file extensions to their programming language names * Used for syntax highlighting, code analysis, and display purposes */ export declare const LANGUAGE_MAP: Record<string, string>; /** * Maps exact filenames (without extension) to their language/type * Used for special files like Dockerfile, Makefile, etc. */ export declare const EXACT_FILENAME_MAP: Record<string, string>; /** * Detects the programming language from a filename * * @param filename - The filename to detect language from * @returns The detected language name or 'Unknown' * * @example * ```typescript * detectLanguageFromFilename('app.ts') // Returns 'TypeScript' * detectLanguageFromFilename('Dockerfile') // Returns 'Dockerfile' * detectLanguageFromFilename('unknown.xyz') // Returns 'Unknown' * ``` */ export declare function detectLanguageFromFilename(filename: string): string; /** * Gets the lowercase language identifier for syntax highlighting * * @param filename - The filename to get language identifier from * @returns The lowercase language identifier suitable for syntax highlighting * * @example * ```typescript * getLanguageIdentifier('app.ts') // Returns 'typescript' * getLanguageIdentifier('Dockerfile') // Returns 'dockerfile' * ``` */ export declare function getLanguageIdentifier(filename: string): string; /** * Checks if a file is a source code file based on its extension * * @param filename - The filename to check * @returns True if the file is a source code file */ export declare function isSourceCodeFile(filename: string): boolean; /** * Gets all supported file extensions * * @returns Array of all supported file extensions */ export declare function getSupportedExtensions(): string[]; /** * Gets all supported exact filenames * * @returns Array of all supported exact filenames */ export declare function getSupportedFilenames(): string[];