You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,24 +41,24 @@ The primary export of `check-error` is an object which has the following methods
41
41
*`getMessage(err)` - Retrieves the message of an error or `err` itself if it's a String. If `err` or `err.message` is undefined we return an empty String.
42
42
43
43
```js
44
-
var checkError =require('check-error');
44
+
import*ascheckError'check-error';
45
45
```
46
46
47
47
#### .compatibleInstance(err, errorLike)
48
48
49
49
```js
50
-
var checkError =require('check-error');
50
+
import*ascheckError'check-error';
51
51
52
-
varfuncThatThrows=function() { thrownewTypeError('I am a TypeError') };
53
-
var caughtErr;
52
+
constfuncThatThrows=function() { thrownewTypeError('I am a TypeError') };
0 commit comments