Remove function

This commit is contained in:
Andras Schmelczer 2025-06-29 15:49:05 +01:00
parent 17f67602d9
commit c1aa8fe463
2 changed files with 1 additions and 25 deletions

View file

@ -99,17 +99,6 @@ pub fn is_binary(data: &[u8]) -> bool {
std::str::from_utf8(data).is_err()
}
/// We don't want to support merging structured data like JSON, YAML, etc.
#[wasm_bindgen(js_name = isFileTypeMergable)]
#[must_use]
pub fn is_file_type_mergable(path_or_file_name: &str) -> bool {
set_panic_hook();
let file_extension = path_or_file_name.split('.').next_back().unwrap_or_default();
matches!(file_extension.to_lowercase().as_str(), "md" | "txt")
}
fn set_panic_hook() {
// https://github.com/rustwasm/console_error_panic_hook#readme
#[cfg(feature = "console_error_panic_hook")]