We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57ddbf7 commit c0d2400Copy full SHA for c0d2400
packages/lib/src/error.ts
@@ -0,0 +1,7 @@
1
+export function ignoreError<T>(fn: () => T): T | undefined {
2
+ try {
3
+ return fn();
4
+ } catch {
5
+ // do nothing
6
+ }
7
+}
packages/lib/src/index.ts
@@ -1,2 +1,3 @@
export { shuffle } from './shuffle.js';
+export { ignoreError } from './error.js';
export { zenkakuAlphanumericalsToHankaku } from './zenkaku.js';
0 commit comments