@zag-js/file-utils 1.18.3 → 1.18.5
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.
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,6 +15,10 @@ var getFileEntries = (items, traverseDirectories) => Promise.all(
|
|
|
15
15
|
if (isDirectoryEntry(entry) && traverseDirectories) {
|
|
16
16
|
return getDirectoryFiles(entry.createReader(), `${entry.name}`);
|
|
17
17
|
}
|
|
18
|
+
if (isFileEntry(entry) && typeof item.getAsFile === "function") {
|
|
19
|
+
const file = item.getAsFile();
|
|
20
|
+
return Promise.resolve(file ? addRelativePath(file, "") : null);
|
|
21
|
+
}
|
|
18
22
|
if (isFileEntry(entry)) {
|
|
19
23
|
return new Promise((resolve) => {
|
|
20
24
|
entry.file((file) => {
|
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,10 @@ var getFileEntries = (items, traverseDirectories) => Promise.all(
|
|
|
13
13
|
if (isDirectoryEntry(entry) && traverseDirectories) {
|
|
14
14
|
return getDirectoryFiles(entry.createReader(), `${entry.name}`);
|
|
15
15
|
}
|
|
16
|
+
if (isFileEntry(entry) && typeof item.getAsFile === "function") {
|
|
17
|
+
const file = item.getAsFile();
|
|
18
|
+
return Promise.resolve(file ? addRelativePath(file, "") : null);
|
|
19
|
+
}
|
|
16
20
|
if (isFileEntry(entry)) {
|
|
17
21
|
return new Promise((resolve) => {
|
|
18
22
|
entry.file((file) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/file-utils",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.5",
|
|
4
4
|
"description": "JS File API utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"clean-package": "../../../clean-package.config.json",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@zag-js/i18n-utils": "1.18.
|
|
27
|
+
"@zag-js/i18n-utils": "1.18.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"clean-package": "2.2.0"
|