| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fixed basing on the previous example.
Unlike method signatures, examples mostly use camelCase.
Currently, the code throws. Fixed basing on the history.
| const bob_secret = bob.computeSecret(alice_key); | ||
|
|
||
| assert(alice_secret, bob_secret); | ||
| assert.equal(alice_secret.toString('hex'), bob_secret.toString('hex')); |
There was a problem hiding this comment.
Nit: assert.strictEqual()? Not sure if it is preferred on doc examples.
Edit: nvm fixed in next commit.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry for the confusion, I've tried to do it step by step and to split by topics)
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, thanks for splitting into multiple commits to simplify the review.
Sorry, something went wrong.
|
/cc @nodejs/crypto |
Sorry, something went wrong.
|
/cc @nodejs/documentation |
Sorry, something went wrong.
There was a problem hiding this comment.
OK. Will all the examples still run on 4.x?
Sorry, something went wrong.
|
I see no reason why they would not. |
Sorry, something went wrong.
|
I appreciate the breakdown of the PR into small commits, we should squash before landing, though. |
Sorry, something went wrong.
|
And that's 5 days and two approvals, @vsemozhetbyt you are good to land. |
Sorry, something went wrong.
* var -> const / let in crypto.md * fix error in crypto.md code example * equal -> strictEqual, == -> === in crypto.md * update estimated outputs in crypto.md * snake_case -> camelCase in crypto.md examples * concatenation -> multiline template in crypto * add missing line break in crypto code example * add missing link reference in crypto.md PR-URL: #10909 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* var -> const / let in crypto.md * fix error in crypto.md code example * equal -> strictEqual, == -> === in crypto.md * update estimated outputs in crypto.md * snake_case -> camelCase in crypto.md examples * concatenation -> multiline template in crypto * add missing line break in crypto code example * add missing link reference in crypto.md PR-URL: nodejs#10909 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* var -> const / let in crypto.md * fix error in crypto.md code example * equal -> strictEqual, == -> === in crypto.md * update estimated outputs in crypto.md * snake_case -> camelCase in crypto.md examples * concatenation -> multiline template in crypto * add missing line break in crypto code example * add missing link reference in crypto.md PR-URL: nodejs#10909 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* var -> const / let in crypto.md * fix error in crypto.md code example * equal -> strictEqual, == -> === in crypto.md * update estimated outputs in crypto.md * snake_case -> camelCase in crypto.md examples * concatenation -> multiline template in crypto * add missing line break in crypto code example * add missing link reference in crypto.md PR-URL: #10909 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* var -> const / let in crypto.md * fix error in crypto.md code example * equal -> strictEqual, == -> === in crypto.md * update estimated outputs in crypto.md * snake_case -> camelCase in crypto.md examples * concatenation -> multiline template in crypto * add missing line break in crypto code example * add missing link reference in crypto.md PR-URL: #10909 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
doc, crypto