Skip to content

Commit

Permalink
doc: Add example of null to assert.ifError
Browse files Browse the repository at this point in the history
PR-URL: nodejs#18236
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
Leko authored and MayaLekova committed May 8, 2018
1 parent 68bc3b2 commit 5ac5a7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ argument in callbacks.
```js
const assert = require('assert').strict;

assert.ifError(null);
// OK
assert.ifError(0);
// OK
assert.ifError(1);
Expand Down

0 comments on commit 5ac5a7a

Please sign in to comment.