@zag-js/file-utils 1.45.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,7 +25,7 @@ __export(get_file_mime_type_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(get_file_mime_type_exports);
|
|
26
26
|
var import_mime_types = require("./mime-types.js");
|
|
27
27
|
function getFileMimeType(name) {
|
|
28
|
-
const extension = name.split(".").pop();
|
|
28
|
+
const extension = name.split(".").pop()?.toLowerCase();
|
|
29
29
|
return extension ? import_mime_types.mimeTypesMap.get(extension) || null : null;
|
|
30
30
|
}
|
|
31
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/get-file-mime-type.ts
|
|
2
2
|
import { mimeTypesMap } from "./mime-types.mjs";
|
|
3
3
|
function getFileMimeType(name) {
|
|
4
|
-
const extension = name.split(".").pop();
|
|
4
|
+
const extension = name.split(".").pop()?.toLowerCase();
|
|
5
5
|
return extension ? mimeTypesMap.get(extension) || null : null;
|
|
6
6
|
}
|
|
7
7
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/file-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"description": "JS File API utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"clean-package": "../../../clean-package.config.json",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@zag-js/i18n-utils": "1.
|
|
30
|
+
"@zag-js/i18n-utils": "1.47.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"clean-package": "2.2.0",
|
|
34
|
-
"vitest": "^
|
|
34
|
+
"vitest": "^5.0.0"
|
|
35
35
|
},
|
|
36
36
|
"module": "dist/index.mjs",
|
|
37
37
|
"types": "dist/index.d.ts",
|