bcrypt.js icon indicating copy to clipboard operation
bcrypt.js copied to clipboard

Add examples of promises for each function

Open ericandrewlewis opened this issue 8 years ago • 0 comments

Hi there,

this is my first issue to open on this repository. Thank you for offering this library!

When looking at the examples in the README, it took me a while to figure out that each method can return a promise.

I'll suggest that for each method example, like bcrypt.genSalt(), bcrypt.hash(), and bcrypt.compare(), there are three examples: one for a callback, one for a promise with .then(), and one using await.

If this sounds good I'd be glad to make a suggested format in a pull request.

ericandrewlewis avatar Oct 05 '18 20:10 ericandrewlewis