<NME> forever_gen_salt.js
<BEF> var bcrypt = require('../bcrypt');

while (true) {
  bcrypt.gen_salt(10, function(err, salt) {
    console.log('salt: ' + salt);
  });
}

<MSG> Fixed examples

I was getting a bunch of deprecation warnings. Also, nothing
printed to the console from within that while loop.

<DFF> @@ -1,7 +1,8 @@
 var bcrypt = require('../bcrypt');
 
-while (true) {
-  bcrypt.gen_salt(10, function(err, salt) {
+(function printSalt() {
+  bcrypt.genSalt(10, function(err, salt) {
     console.log('salt: ' + salt);
+    printSalt();
   });
-}
+})()

{'commit': "diff --git a/examples/async_compare.js b/examples/async_compare.js\nindex d04c9b1..e5a8daa 100644\n--- a/examples/async_compare.js\n+++ b/examples/async_compare.js\n@@ -1,13 +1,13 @@\n var bcrypt = require('../bcrypt');\n \n var start = Date.now();\n-bcrypt.gen_salt(10, function(err, salt) {\n+bcrypt.genSalt(10, function(err, salt) {\n   console.log('salt: ' + salt);\n   console.log('salt cb end: ' + (Date.now() - start) + 'ms');\n-  bcrypt.encrypt('test', salt, function(err, crypted) {\n+  bcrypt.hash('test', salt, function(err, crypted) {\n     console.log('crypted: ' + crypted);\n     console.log('crypted cb end: ' + (Date.now() - start) + 'ms');\n-    console.log('rounds used from hash:', bcrypt.get_rounds(crypted));\n+    console.log('rounds used from hash:', bcrypt.getRounds(crypted));\n     bcrypt.compare('test', crypted, function(err, res) {\n       console.log('compared true: ' + res);\n       console.log('compared true cb end: ' + (Date.now() - start) + 'ms');\ndiff --git a/examples/forever_gen_salt.js b/examples/forever_gen_salt.js\nindex 3e04745..761686a 100644\n--- a/examples/forever_gen_salt.js\n+++ b/examples/forever_gen_salt.js\n@@ -1,7 +1,8 @@\n var bcrypt = require('../bcrypt');\n \n-while (true) {\n-  bcrypt.gen_salt(10, function(err, salt) {\n+(function printSalt() {\n+  bcrypt.genSalt(10, function(err, salt) {\n     console.log('salt: ' + salt);\n+    printSalt();\n   });\n-}\n+})()\n", 'commit_subject': 'Fixed examples', 'repo_name': 'kelektiv/node.bcrypt.js', 'committer': {'name': 'Gabriel Farrell', 'email': '54fd1711209fb1c0781092374132c66e79e2241b@grrawr.com', 'time_sec': '1341346679', 'tz_offset': '-240', 'date': {'seconds': '1341346679'}}, 'commit_tree': '76cc2c3d513b02ca1ecb81f5682487325753b7fe', 'commit_message': 'Fixed examples\n\nI was getting a bunch of deprecation warnings. Also, nothing\nprinted to the console from within that while loop.\n', 'language_name': 'C++', 'license': 'mit', 'hunks': "@@ -1,7 +1,8 @@\n var bcrypt = require('../bcrypt');\n \n-while (true) {\n-  bcrypt.gen_salt(10, function(err, salt) {\n+(function printSalt() {\n+  bcrypt.genSalt(10, function(err, salt) {\n     console.log('salt: ' + salt);\n+    printSalt();\n   });\n-}\n+})()\n", 'addition_count': 4, 'deletion_count': 3, 'src_file': 'a/examples/forever_gen_salt.js', 'tgt_file': 'b/examples/forever_gen_salt.js', 'file_extension': '.js', 'before_file': "var bcrypt = require('../bcrypt');\n\nwhile (true) {\n  bcrypt.gen_salt(10, function(err, salt) {\n    console.log('salt: ' + salt);\n  });\n}\n", 'message': 'Fixed examples\n\nI was getting a bunch of deprecation warnings. Also, nothing\nprinted to the console from within that while loop.\n', 'author_name': 'Gabriel Farrell', 'lang': 'js'}