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: #18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
Leko authored and MylesBorins committed Feb 27, 2018
1 parent 74d86cc commit d554b8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/assert.md
Expand Up @@ -337,6 +337,8 @@ argument in callbacks.
```js
const assert = require('assert');

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

0 comments on commit d554b8a

Please sign in to comment.