How can I get rid of the auto generated returns in my coffee script:
createHash = (password) ->
bcrypt.genSalt 10, (err, salt) ->
bcrypt.hash password, salt, (err, hash) ->
hash
I'm getting ...
createHash = function(password) {
return bcrypt.genSalt(10, function(err, salt) {
return bcrypt.hash(password, salt, function(err, hash) {
return hash;
});
});
};
... but I desire a solution without the returns:
createHash = function(password) {
bcrypt.genSalt(10, function(err, salt) {
bcrypt.hash(password, salt, function(err, hash) {
return hash;
});
});
};
How am I getting this done?