dchest / scrypt-async-js

Fast "async" scrypt implementation in JavaScript
http://dchest.github.io/scrypt-async-js/
BSD 2-Clause "Simplified" License
140 stars 26 forks source link

Add Promise support, bump to 2.0.1 #40

Closed Cretezy closed 6 years ago

Cretezy commented 6 years ago

I've also generated a yarn.lock for use with Yarn. This won't affect anything.

This does add a dependency on promise, which adds 0.9KB on the final build size (7.09 KB -> 7.18 KB).

dchest commented 6 years ago

Thanks for PR, however this package is targeting really old browsers, and I hate including shims, especially if it requires external dependencies. Since it's simple enough to just wrap it into a promise in user code, I don't think it's necessary.

See also https://github.com/dchest/scrypt-async-js/pull/28

BTW, my newer package in StableLib uses promises exclusively, so you can switch to it instead https://github.com/StableLib/stablelib/tree/master/packages/scrypt

Cretezy commented 6 years ago

Perfectly understandable. I'm going to maintain my own fork with a more modern toolkit (Rollup, Jest, ES6+)! Thank you for the library.

Cretezy commented 6 years ago

https://github.com/Cretezy/scrypt-async-modern

Basically I've updated the code to ES6 (still compiled down to ES5) ,moved to Rollup and Jest, and a few cleanups. It's the same code but modernized overall. :)