From 4bee1a8345e1c398f8400a89f7eafbf515fd48ce Mon Sep 17 00:00:00 2001 From: anders Date: Fri, 1 Nov 2019 09:51:51 +0100 Subject: [PATCH 1/2] Updated the examples to use the word response instead of res to avoid collision --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1b063462..b4cdacdf 100644 --- a/README.md +++ b/README.md @@ -125,11 +125,11 @@ Note that both techniques achieve the same end-result. ```javascript // Load hash from your password DB. -bcrypt.compare(myPlaintextPassword, hash, function(err, res) { - // res == true +bcrypt.compare(myPlaintextPassword, hash, function(err, response) { + // response == true }); -bcrypt.compare(someOtherPlaintextPassword, hash, function(err, res) { - // res == false +bcrypt.compare(someOtherPlaintextPassword, hash, function(err, response) { + // response == false }); ``` @@ -150,11 +150,11 @@ bcrypt.hash(myPlaintextPassword, saltRounds).then(function(hash) { ``` ```javascript // Load hash from your password DB. -bcrypt.compare(myPlaintextPassword, hash).then(function(res) { - // res == true +bcrypt.compare(myPlaintextPassword, hash).then(function(response) { + // response == true }); -bcrypt.compare(someOtherPlaintextPassword, hash).then(function(res) { - // res == false +bcrypt.compare(someOtherPlaintextPassword, hash).then(function(response) { + // response == false }); ``` From 39057dd56ee5d76f937ea92fbf77cecc50740478 Mon Sep 17 00:00:00 2001 From: anders Date: Fri, 1 Nov 2019 14:00:46 +0100 Subject: [PATCH 2/2] Changed the word used in the documentation from response to result --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b4cdacdf..b8a8dd20 100644 --- a/README.md +++ b/README.md @@ -125,11 +125,11 @@ Note that both techniques achieve the same end-result. ```javascript // Load hash from your password DB. -bcrypt.compare(myPlaintextPassword, hash, function(err, response) { - // response == true +bcrypt.compare(myPlaintextPassword, hash, function(err, result) { + // result == true }); -bcrypt.compare(someOtherPlaintextPassword, hash, function(err, response) { - // response == false +bcrypt.compare(someOtherPlaintextPassword, hash, function(err, result) { + // == false }); ``` @@ -150,11 +150,11 @@ bcrypt.hash(myPlaintextPassword, saltRounds).then(function(hash) { ``` ```javascript // Load hash from your password DB. -bcrypt.compare(myPlaintextPassword, hash).then(function(response) { - // response == true +bcrypt.compare(myPlaintextPassword, hash).then(function(result) { + // result == true }); -bcrypt.compare(someOtherPlaintextPassword, hash).then(function(response) { - // response == false +bcrypt.compare(someOtherPlaintextPassword, hash).then(function(result) { + // result == false }); ```