@willbooster/shared-lib 1.6.0 → 1.7.1

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.
@@ -0,0 +1,2 @@
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){}},exports.shuffle=function(t){for(let r=t.length-1;r>0;r--){const n=Math.floor(Math.random()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t},exports.zenkakuAlphanumericalsToHankaku=function(t){return t.replace(/[0-9A-Za-z]/g,(t=>{var r;return String.fromCodePoint((null!==(r=t.codePointAt(0))&&void 0!==r?r:0)-65248)}))};
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ declare function shuffle<T>(array: T[]): T[];
2
+ declare function ignoreError<T>(fn: () => T): T | undefined;
3
+ declare function ignoreEnoent<T>(fn: () => T): T | undefined;
4
+ declare function ignoreErrorAsync<T>(fn: () => Promise<T>): Promise<T | undefined>;
5
+ declare function ignoreEnoentAsync<T>(fn: () => Promise<T>): Promise<T | undefined>;
6
+ declare function zenkakuAlphanumericalsToHankaku(str: string): string;
7
+ export { shuffle, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, zenkakuAlphanumericalsToHankaku };
@@ -0,0 +1,5 @@
1
+ declare function ignoreError<T>(fn: () => T): T | undefined;
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 };
@@ -0,0 +1,2 @@
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
+ //# sourceMappingURL=error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -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";
@@ -0,0 +1,2 @@
1
+ export{shuffle}from"./shuffle.mjs";export{ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync}from"./error.mjs";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -1,2 +1,2 @@
1
1
  function t(t){for(let o=t.length-1;o>0;o--){const n=Math.floor(Math.random()*(o+1));[t[o],t[n]]=[t[n],t[o]]}return t}export{t as shuffle};
2
- //# sourceMappingURL=shuffle.js.map
2
+ //# sourceMappingURL=shuffle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
File without changes
@@ -1,2 +1,2 @@
1
1
  function r(r){return r.replace(/[0-9A-Za-z]/g,(r=>{var n;return String.fromCodePoint((null!==(n=r.codePointAt(0))&&void 0!==n?n:0)-65248)}))}export{r as zenkakuAlphanumericalsToHankaku};
2
- //# sourceMappingURL=zenkaku.js.map
2
+ //# sourceMappingURL=zenkaku.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zenkaku.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "license": "Apache-2.0",
5
5
  "author": "WillBooster Inc.",
6
6
  "type": "module",
7
- "main": "dist/cjs/index.js",
8
- "module": "dist/esm/index.js",
9
- "types": "dist/esm/index.d.ts",
7
+ "main": "dist/cjs/index.cjs",
8
+ "module": "dist/esm/index.mjs",
9
+ "types": "dist/cjs/index.d.cts",
10
10
  "files": [
11
11
  "bin/",
12
12
  "dist/"
@@ -25,13 +25,13 @@
25
25
  "@types/eslint": "8.4.10",
26
26
  "@types/micromatch": "4.0.2",
27
27
  "@types/prettier": "2.7.2",
28
- "@typescript-eslint/eslint-plugin": "5.47.1",
29
- "@typescript-eslint/parser": "5.47.1",
28
+ "@typescript-eslint/eslint-plugin": "5.48.0",
29
+ "@typescript-eslint/parser": "5.48.0",
30
30
  "@willbooster/eslint-config-ts": "10.0.8",
31
31
  "@willbooster/prettier-config": "9.1.1",
32
- "build-ts": "3.1.3",
33
- "eslint": "8.30.0",
34
- "eslint-config-prettier": "8.5.0",
32
+ "build-ts": "3.2.1",
33
+ "eslint": "8.31.0",
34
+ "eslint-config-prettier": "8.6.0",
35
35
  "eslint-import-resolver-typescript": "3.5.2",
36
36
  "eslint-plugin-import": "2.26.0",
37
37
  "eslint-plugin-sort-class-members": "1.16.0",
@@ -1,2 +0,0 @@
1
- declare function ignoreError<T>(fn: () => T): T | undefined;
2
- export { ignoreError };
package/dist/cjs/error.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";exports.ignoreError=function(r){try{return r()}catch(r){}};
2
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export { shuffle } from "./shuffle";
2
- export { ignoreError } from "./error";
3
- export { zenkakuAlphanumericalsToHankaku } from "./zenkaku";
package/dist/cjs/index.js DELETED
@@ -1,2 +0,0 @@
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;
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";exports.shuffle=function(t){for(let o=t.length-1;o>0;o--){const r=Math.floor(Math.random()*(o+1));[t[o],t[r]]=[t[r],t[o]]}return t};
2
- //# sourceMappingURL=shuffle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shuffle.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";exports.zenkakuAlphanumericalsToHankaku=function(n){return n.replace(/[0-9A-Za-z]/g,(n=>{var r;return String.fromCodePoint((null!==(r=n.codePointAt(0))&&void 0!==r?r:0)-65248)}))};
2
- //# sourceMappingURL=zenkaku.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zenkaku.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- declare function ignoreError<T>(fn: () => T): T | undefined;
2
- export { ignoreError };
package/dist/esm/error.js DELETED
@@ -1,2 +0,0 @@
1
- function t(t){try{return t()}catch(t){}}export{t as ignoreError};
2
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/esm/index.js DELETED
@@ -1,2 +0,0 @@
1
- export{shuffle}from"./shuffle.js";export{ignoreError}from"./error.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- declare function shuffle<T>(array: T[]): T[];
2
- export { shuffle };
@@ -1 +0,0 @@
1
- {"version":3,"file":"shuffle.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- declare function zenkakuAlphanumericalsToHankaku(str: string): string;
2
- export { zenkakuAlphanumericalsToHankaku };
@@ -1 +0,0 @@
1
- {"version":3,"file":"zenkaku.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}