@teselagen/file-utils 0.2.15 → 0.2.16

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
@@ -14488,10 +14488,17 @@ License: MIT
14488
14488
  var papaparse_minExports = papaparse_min.exports;
14489
14489
  const allowedCsvFileTypes = [".csv", ".txt", ".xlsx"];
14490
14490
  const isZipFile = /* @__PURE__ */ __name((file) => {
14491
+ if (getExt(file) === "zip")
14492
+ return true;
14493
+ if (getExt(file) === "geneious")
14494
+ return false;
14491
14495
  const type = file.mimetype || file.type;
14492
14496
  return type === "application/zip" || type === "application/x-zip-compressed";
14493
14497
  }, "isZipFile");
14494
- const getExt = /* @__PURE__ */ __name((file) => file.name.split(".").pop(), "getExt");
14498
+ const getExt = /* @__PURE__ */ __name((file) => {
14499
+ var _a;
14500
+ return (_a = file == null ? void 0 : file.name) == null ? void 0 : _a.split(".").pop();
14501
+ }, "getExt");
14495
14502
  const isExcelFile = /* @__PURE__ */ __name((file) => getExt(file) === "xlsx", "isExcelFile");
14496
14503
  const isCsvFile = /* @__PURE__ */ __name((file) => getExt(file) === "csv", "isCsvFile");
14497
14504
  const isTextFile = /* @__PURE__ */ __name((file) => ["text", "txt"].includes(getExt(file)), "isTextFile");
package/index.mjs CHANGED
@@ -14486,10 +14486,17 @@ License: MIT
14486
14486
  var papaparse_minExports = papaparse_min.exports;
14487
14487
  const allowedCsvFileTypes = [".csv", ".txt", ".xlsx"];
14488
14488
  const isZipFile = /* @__PURE__ */ __name((file) => {
14489
+ if (getExt(file) === "zip")
14490
+ return true;
14491
+ if (getExt(file) === "geneious")
14492
+ return false;
14489
14493
  const type = file.mimetype || file.type;
14490
14494
  return type === "application/zip" || type === "application/x-zip-compressed";
14491
14495
  }, "isZipFile");
14492
- const getExt = /* @__PURE__ */ __name((file) => file.name.split(".").pop(), "getExt");
14496
+ const getExt = /* @__PURE__ */ __name((file) => {
14497
+ var _a;
14498
+ return (_a = file == null ? void 0 : file.name) == null ? void 0 : _a.split(".").pop();
14499
+ }, "getExt");
14493
14500
  const isExcelFile = /* @__PURE__ */ __name((file) => getExt(file) === "xlsx", "isExcelFile");
14494
14501
  const isCsvFile = /* @__PURE__ */ __name((file) => getExt(file) === "csv", "isCsvFile");
14495
14502
  const isTextFile = /* @__PURE__ */ __name((file) => ["text", "txt"].includes(getExt(file)), "isTextFile");