doc: fix and modernize code examples in crypto.md#10909
Closed
vsemozhetbyt wants to merge 8 commits intonodejs:masterfrom
vsemozhetbyt:crypto.md
Closed
doc: fix and modernize code examples in crypto.md#10909vsemozhetbyt wants to merge 8 commits intonodejs:masterfrom vsemozhetbyt:crypto.md
vsemozhetbyt wants to merge 8 commits intonodejs:masterfrom
vsemozhetbyt:crypto.md
Conversation
Fixed basing on the previous example.
Unlike method signatures, examples mostly use camelCase.
Currently, the code throws. Fixed basing on the history.
lpinca
reviewed
Jan 21, 2017
doc/api/crypto.md
Outdated
| const bob_secret = bob.computeSecret(alice_key); | ||
|
|
||
| assert(alice_secret, bob_secret); | ||
| assert.equal(alice_secret.toString('hex'), bob_secret.toString('hex')); |
Member
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.
Contributor
Author
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)
lpinca
approved these changes
Jan 21, 2017
Member
lpinca
left a comment
There was a problem hiding this comment.
LGTM, thanks for splitting into multiple commits to simplify the review.
Member
|
/cc @nodejs/crypto |
Contributor
Author
|
/cc @nodejs/documentation |
sam-github
approved these changes
Jan 24, 2017
Contributor
sam-github
left a comment
There was a problem hiding this comment.
OK. Will all the examples still run on 4.x?
Member
|
I see no reason why they would not. |
Contributor
|
I appreciate the breakdown of the PR into small commits, we should squash before landing, though. |
Contributor
|
And that's 5 days and two approvals, @vsemozhetbyt you are good to land. |
jasnell
approved these changes
Jan 24, 2017
jasnell
pushed a commit
that referenced
this pull request
Jan 24, 2017
* 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>
Member
|
Landed in squashed commit 3e9c8ef |
italoacasas
pushed a commit
to italoacasas/node
that referenced
this pull request
Jan 24, 2017
* 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>
italoacasas
pushed a commit
to italoacasas/node
that referenced
this pull request
Jan 27, 2017
* 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>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Mar 7, 2017
* 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>
MylesBorins
pushed a commit
that referenced
this pull request
Mar 9, 2017
* 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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Affected core subsystem(s)
doc, crypto
var->const/let.equal->strictEqual,==->===.