Commit 4cf5fc2
committed
doc: mark the callback argument of crypto.generatePrime as mandatory
The current documentation lists the `callback` argument of
`crypto.generatePrime` as optional (it's surrounded by square
brackets), but this is incorrect - calling the function without a
callback will result in an `ERR_INVALID_ARG_TYPE` error:
For the record, the correct way to generate a prime synchronously,
without a callback, is to use the `generatePrimeSync` API.
This patch fixes the documentation and marks the callback argument as
mandatory. The `options` (second) argument, is indeed optional, and
is marked as such.
Fixes: #582981 parent b673c69 commit 4cf5fc2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3900 | 3900 | | |
3901 | 3901 | | |
3902 | 3902 | | |
3903 | | - | |
| 3903 | + | |
3904 | 3904 | | |
3905 | 3905 | | |
3906 | 3906 | | |
| |||
0 commit comments