FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: fix and modernize code examples in crypto.md by vsemozhetbyt · Pull Request #10909 · nodejs/node · GitHub

/ node Public

doc: fix and modernize code examples in crypto.md - #10909

Closed
vsemozhetbyt wants to merge 8 commits into
nodejs:masterfrom
vsemozhetbyt:crypto.md
Closed

doc: fix and modernize code examples in crypto.md#10909
vsemozhetbyt wants to merge 8 commits into
nodejs:masterfrom
vsemozhetbyt:crypto.md

Conversation

Copy link
Copy Markdown
Contributor
Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc, crypto

  • var -> const / let.
  • Fix error in code example (basing on the previous example).
  • equal -> strictEqual, == -> ===.
  • Update estimated outputs in code example comments.
  • snake_case -> camelCase (unlike method signatures, examples mostly use camelCase).
  • Concatenation -> multiline template.
  • Add missing line break in code example (the code throws currently; fixed basing on the history).
  • Add missing link reference.

nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. lts-watch-v6.x labels Jan 20, 2017
Comment thread 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'));

lpinca Jan 21, 2017
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: assert.strictEqual()? Not sure if it is preferred on doc examples.

Edit: nvm fixed in next commit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sorry for the confusion, I've tried to do it step by step and to split by topics)

lpinca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks for splitting into multiple commits to simplify the review.

jasnell commented Jan 23, 2017

Copy link
Copy Markdown
Member

/cc @nodejs/crypto

vsemozhetbyt commented Jan 24, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

/cc @nodejs/documentation

sam-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

OK. Will all the examples still run on 4.x?

jasnell commented Jan 24, 2017

Copy link
Copy Markdown
Member

I see no reason why they would not.

Copy link
Copy Markdown
Contributor

I appreciate the breakdown of the PR into small commits, we should squash before landing, though.

Copy link
Copy Markdown
Contributor

And that's 5 days and two approvals, @vsemozhetbyt you are good to land.

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>

jasnell commented Jan 24, 2017

Copy link
Copy Markdown
Member

Landed in squashed commit 3e9c8ef

jasnell closed this Jan 24, 2017
vsemozhetbyt deleted the crypto.md branch January 24, 2017 18:57
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>
italoacasas mentioned this pull request Jan 29, 2017
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>
MylesBorins mentioned this pull request Mar 9, 2017
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

Labels

crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL