Closed CorinChappy closed 6 years ago
@CorinChappy - Thanks very much for your contribution here. By coincidence, I just finished moving that farmhash implementation to a different part of the code base. It's now here: https://github.com/koopjs/winnow/blob/master/src/sql.js#L143. So if it's not to much trouble, could you adjust your PR to reflect that change?
That is no problem @rgwozdz, I will make the changes later today
@rgwozdz merged your updates in and made the change!
@rgwozdz Any updates on this?
@CorinChappy it's been merged into master and released as npm 1.16.2.
Hi there, I am trying to build a version of Koop in an environment where I am not able to compile native node modules, this means I can't use the most up-to-date version of Koop due to winnow's dependency on farmhash.
This PR makes the native farmhash module optional, adding a fallback to a pure JavaScript hashing library when farmhash is not installed. This means those that cannot or don't want to use native modules can still use winnow, while others can still take advantage of farmhash's superior speed.
I roughly followed the instructions for optional dependencies on npm but let me know if you'd rather I implemented it in a different way.
Thanks!