@willbooster/shared-lib 1.6.0 → 1.7.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.
@@ -1,2 +1,5 @@
1
1
  declare function ignoreError<T>(fn: () => T): T | undefined;
2
- export { ignoreError };
2
+ declare function ignoreEnoent<T>(fn: () => T): T | undefined;
3
+ declare function ignoreErrorAsync<T>(fn: () => Promise<T>): Promise<T | undefined>;
4
+ declare function ignoreEnoentAsync<T>(fn: () => Promise<T>): Promise<T | undefined>;
5
+ export { ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync };
package/dist/cjs/error.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";exports.ignoreError=function(r){try{return r()}catch(r){}};
1
+ "use strict";exports.ignoreEnoent=function(t){try{return t()}catch(t){if("object"==typeof t&&t&&"code"in t&&"ENOENT"===t.code)return;throw t}},exports.ignoreEnoentAsync=async function(t){try{return await t()}catch(t){if("object"==typeof t&&t&&"code"in t&&"ENOENT"===t.code)return;throw t}},exports.ignoreError=function(t){try{return t()}catch(t){}},exports.ignoreErrorAsync=async function(t){try{return await t()}catch(t){}};
2
2
  //# sourceMappingURL=error.js.map
@@ -1,3 +1,3 @@
1
1
  export { shuffle } from "./shuffle";
2
- export { ignoreError } from "./error";
2
+ export { ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync } from "./error";
3
3
  export { zenkakuAlphanumericalsToHankaku } from "./zenkaku";
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("./shuffle.js"),e=require("./error.js"),u=require("./zenkaku.js");exports.shuffle=r.shuffle,exports.ignoreError=e.ignoreError,exports.zenkakuAlphanumericalsToHankaku=u.zenkakuAlphanumericalsToHankaku;
1
+ "use strict";var r=require("./shuffle.js"),e=require("./error.js"),n=require("./zenkaku.js");exports.shuffle=r.shuffle,exports.ignoreEnoent=e.ignoreEnoent,exports.ignoreEnoentAsync=e.ignoreEnoentAsync,exports.ignoreError=e.ignoreError,exports.ignoreErrorAsync=e.ignoreErrorAsync,exports.zenkakuAlphanumericalsToHankaku=n.zenkakuAlphanumericalsToHankaku;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,5 @@
1
1
  declare function ignoreError<T>(fn: () => T): T | undefined;
2
- export { ignoreError };
2
+ declare function ignoreEnoent<T>(fn: () => T): T | undefined;
3
+ declare function ignoreErrorAsync<T>(fn: () => Promise<T>): Promise<T | undefined>;
4
+ declare function ignoreEnoentAsync<T>(fn: () => Promise<T>): Promise<T | undefined>;
5
+ export { ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync };
package/dist/esm/error.js CHANGED
@@ -1,2 +1,2 @@
1
- function t(t){try{return t()}catch(t){}}export{t as ignoreError};
1
+ function t(t){try{return t()}catch(t){}}function c(t){try{return t()}catch(t){if("object"==typeof t&&t&&"code"in t&&"ENOENT"===t.code)return;throw t}}async function r(t){try{return await t()}catch(t){}}async function n(t){try{return await t()}catch(t){if("object"==typeof t&&t&&"code"in t&&"ENOENT"===t.code)return;throw t}}export{c as ignoreEnoent,n as ignoreEnoentAsync,t as ignoreError,r as ignoreErrorAsync};
2
2
  //# sourceMappingURL=error.js.map
@@ -1,3 +1,3 @@
1
1
  export { shuffle } from "./shuffle";
2
- export { ignoreError } from "./error";
2
+ export { ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync } from "./error";
3
3
  export { zenkakuAlphanumericalsToHankaku } from "./zenkaku";
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{shuffle}from"./shuffle.js";export{ignoreError}from"./error.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
1
+ export{shuffle}from"./shuffle.js";export{ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync}from"./error.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "WillBooster Inc.",
6
6
  "type": "module",