File tree 4 files changed +36
-6
lines changed
4 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 20
20
- name : Build
21
21
run : pnpm build
22
22
23
- - uses : actions/setup-node@v1
23
+ - uses : actions/setup-node@v2
24
24
with :
25
- node-version : 12
25
+ node-version : 14
26
26
registry-url : https://registry.npmjs.org/
27
27
28
28
- run : npm publish
@@ -40,13 +40,14 @@ jobs:
40
40
with :
41
41
version : 6.6.2
42
42
run_install : true
43
+ registry : https://npm.pkg.github.com
43
44
44
45
- name : Build
45
46
run : pnpm build
46
47
47
- - uses : actions/setup-node@v1
48
+ - uses : actions/setup-node@v2
48
49
with :
49
- node-version : 12
50
+ node-version : 14
50
51
registry-url : https://npm.pkg.github.com
51
52
52
53
- run : npm publish
Original file line number Diff line number Diff line change @@ -38,6 +38,35 @@ const example = async () => {
38
38
example ();
39
39
```
40
40
41
+ ### Browser Examples
42
+
43
+ ``` html
44
+ <!DOCTYPE html>
45
+ <html >
46
+ <head >
47
+ <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] " ></
script >
48
+ </head >
49
+ <body >
50
+
51
+ <h1 >Exemplo</h1 >
52
+
53
+ <script >
54
+ document .addEventListener (' DOMContentLoaded' , function loaded () {
55
+
56
+ const example = async () => {
57
+ const promise = new Promise ((resolve ) => resolve (' exemple' ));
58
+
59
+ const result = await usingTryCatch (promise);
60
+ console .log (result .data ); // 'example'
61
+ };
62
+
63
+ example ();
64
+ });
65
+ </script >
66
+ </body >
67
+ </html >
68
+ ```
69
+
41
70
42
71
### NPM Statistics
43
72
Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 0.1.1 " ,
2
+ "version" : " 0.1.2 " ,
3
3
"license" : " MIT" ,
4
4
"name" : " using-try-catch" ,
5
5
"module" : " dist/esm/index.js" ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import cleanup from 'rollup-plugin-cleanup';
4
4
export default {
5
5
input : 'src/index.ts' ,
6
6
output : {
7
- name : 'using-try-catch ' ,
7
+ name : 'usingTryCatch ' ,
8
8
dir : 'dist' ,
9
9
format : 'umd' ,
10
10
sourcemap : true
You can’t perform that action at this time.
0 commit comments