@teselagen/file-utils 0.3.10 → 0.3.11

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/index.js CHANGED
@@ -14690,6 +14690,8 @@ const cleanCsvExport = /* @__PURE__ */ __name((rows) => {
14690
14690
  return rows;
14691
14691
  }, "cleanCsvExport");
14692
14692
  const filterFilesInZip = /* @__PURE__ */ __name((file, accepted) => __async(exports, null, function* () {
14693
+ if (!file || Array.isArray(file) && !file.length)
14694
+ return [];
14693
14695
  const zipExtracted = yield extractZipFiles(file);
14694
14696
  const acceptedFiles = [];
14695
14697
  for (const extFile of zipExtracted) {
package/index.mjs CHANGED
@@ -14688,6 +14688,8 @@ const cleanCsvExport = /* @__PURE__ */ __name((rows) => {
14688
14688
  return rows;
14689
14689
  }, "cleanCsvExport");
14690
14690
  const filterFilesInZip = /* @__PURE__ */ __name((file, accepted) => __async(void 0, null, function* () {
14691
+ if (!file || Array.isArray(file) && !file.length)
14692
+ return [];
14691
14693
  const zipExtracted = yield extractZipFiles(file);
14692
14694
  const acceptedFiles = [];
14693
14695
  for (const extFile of zipExtracted) {
package/index.umd.js CHANGED
@@ -14692,6 +14692,8 @@ var __async = (__this, __arguments, generator) => {
14692
14692
  return rows;
14693
14693
  }, "cleanCsvExport");
14694
14694
  const filterFilesInZip = /* @__PURE__ */ __name((file, accepted) => __async(this, null, function* () {
14695
+ if (!file || Array.isArray(file) && !file.length)
14696
+ return [];
14695
14697
  const zipExtracted = yield extractZipFiles(file);
14696
14698
  const acceptedFiles = [];
14697
14699
  for (const extFile of zipExtracted) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/file-utils",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "dependencies": {
5
5
  "bluebird": "^3.7.2",
6
6
  "jszip": "^3.10.1",
package/src/file-utils.js CHANGED
@@ -288,6 +288,7 @@ export const cleanCsvExport = rows => {
288
288
  };
289
289
 
290
290
  export const filterFilesInZip = async (file, accepted) => {
291
+ if (!file || (Array.isArray(file) && !file.length)) return [];
291
292
  const zipExtracted = await extractZipFiles(file);
292
293
  const acceptedFiles = [];
293
294
  for (const extFile of zipExtracted) {