File tree Expand file tree Collapse file tree 3 files changed +36
-48
lines changed
Expand file tree Collapse file tree 3 files changed +36
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ permissions :
4+ contents : read
5+
6+ on : [push, pull_request]
7+
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.ref }}
10+ cancel-in-progress : true
11+
12+ jobs :
13+ test :
14+ name : ' Test'
15+ runs-on : ${{ matrix.os }}
16+ timeout-minutes : 10
17+
18+ strategy :
19+ matrix :
20+ node-version : [20.x, 22.x, 24.x]
21+ os : [ubuntu-latest, windows-latest, macOS-latest]
22+
23+ steps :
24+ - uses : actions/checkout@v5
25+
26+ - name : Use Node.js ${{ matrix.node-version }}
27+ uses : actions/setup-node@v5
28+ with :
29+ node-version : ${{ matrix.node-version }}
30+
31+ - run : npm ci
32+
33+ - run : npm test
Original file line number Diff line number Diff line change 11# nice-try
22
3- ![ Build ] ( https://github.com/electerious/nice-try/workflows/Build /badge.svg )
3+ [ ![ Test ] ( https://github.com/electerious/nice-try/actions/ workflows/test.yml /badge.svg )] ( https://github.com/electerious/nice-try/actions/workflows/test.yml )
44
55A function that tries to execute a function and discards any error that occurs.
66
@@ -38,7 +38,7 @@ await niceTry(async () => JSON.parse('error')) // undefined
3838
3939#### Returns
4040
41- - ` {* } ` The return value of the function, or ` undefined ` if an error occurred.
41+ - ` {any } ` The return value of the function, or ` undefined ` if an error occurred.
4242
4343### ` nice-try/promises `
4444
@@ -48,7 +48,7 @@ await niceTry(async () => JSON.parse('error')) // undefined
4848
4949#### Returns
5050
51- - ` {Promise<* >} ` The result of the function if it resolves successfully, otherwise undefined if an error is thrown.
51+ - ` {Promise<any >} ` The result of the function if it resolves successfully, otherwise undefined if an error is thrown.
5252
5353## What others say
5454
You can’t perform that action at this time.
0 commit comments