@lpc-lang/core
Version:
LPC Language Compiler Library
21 lines • 817 B
TypeScript
/**
* Add a file extension to a filename if it doesn't have one
* @param filename filename to normalize
* @returns
*/
export declare function normalizeFileExtension(filename: string): string;
export declare function normalizeFilename(filename: string): string;
export declare function trimStart(original: string, toRemove: string): string;
export declare function pushIfDefined<T>(arr: T[], item: T): void;
/**
* tests if a filename is surrounded by chars @c and if so
* removes them
* @param filename
* @param c
* @returns
*/
export declare function testFilename(filename: string, c: string, cEnd: string): string;
/** escape a string for use in regex */
export declare function escapeRegExp(str: string): string;
export declare function areWeTestingWithJest(): boolean;
//# sourceMappingURL=utils.d.ts.map