Extract consts
This commit is contained in:
parent
aa3c587002
commit
4fcd134e55
2 changed files with 4 additions and 1 deletions
|
|
@ -4,3 +4,4 @@ export const DIFF_CACHE_SIZE_MB = 2;
|
|||
export const MAX_LOG_MESSAGE_COUNT = 100000;
|
||||
export const MAX_HISTORY_ENTRY_COUNT = 5000;
|
||||
export const TIMEOUT_FOR_MERGING_HISTORY_ENTRIES_IN_SECONDS = 60;
|
||||
export const MERGABLE_FILE_TYPES = ["md", "txt"];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { MERGABLE_FILE_TYPES } from "../consts";
|
||||
|
||||
export function isFileTypeMergable(pathOrFileName: string): boolean {
|
||||
const parts = pathOrFileName.split(".");
|
||||
const fileExtension = parts.at(-1) ?? "";
|
||||
|
||||
return ["md", "txt"].includes(fileExtension.toLowerCase());
|
||||
return MERGABLE_FILE_TYPES.includes(fileExtension.toLowerCase());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue