@ceale/util 1.12.3 → 1.12.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/cjs/index.js CHANGED
@@ -412,7 +412,7 @@ class CubicBezier {
412
412
  }
413
413
  // src/error.ts
414
414
  var tryCatch = (parameter) => {
415
- if (parameter && typeof parameter.then === "function" && typeof parameter.catch === "function" && typeof parameter.finally === "function") {
415
+ if (typeof parameter === "object") {
416
416
  return parameter.then((data) => Object.assign([data, null], { data, error: null })).catch((error) => Object.assign([null, error], { data: null, error }));
417
417
  }
418
418
  if (typeof parameter === "function") {
package/dist/esm/index.js CHANGED
@@ -365,7 +365,7 @@ class CubicBezier {
365
365
  }
366
366
  // src/error.ts
367
367
  var tryCatch = (parameter) => {
368
- if (parameter && typeof parameter.then === "function" && typeof parameter.catch === "function" && typeof parameter.finally === "function") {
368
+ if (typeof parameter === "object") {
369
369
  return parameter.then((data) => Object.assign([data, null], { data, error: null })).catch((error) => Object.assign([null, error], { data: null, error }));
370
370
  }
371
371
  if (typeof parameter === "function") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ceale/util",
3
3
  "author": "Ceale",
4
- "version": "1.12.3",
4
+ "version": "1.12.5",
5
5
  "module": "index.ts",
6
6
  "type": "module",
7
7
  "main": "dist/esm/index.js",