Closed christophfriedrich closed 5 years ago
When working on this, we should have a look at #7 as it's not just replacing JSON.stringify() by object-hash. I added some comments there.
I tried to come up with a more light-weight approach than the hash-library based on https://en.wikipedia.org/wiki/Jenkins_hash_function - will probably be not 100% safe to collisions, but should be suitable for our use-case.
To turn the parameter objects into strings (for usage as keys in a
Map
), the Earth Engine driver uses the object-hash library. In this client, I usedJSON.stringify
instead because it was at hand and I don't like additional libraries if I don't really need them.Since @m-mohr had a reason for choosing the lib over the built-in (I remember something like "JSON.stringify is not deterministic"?) it may be smart to use that lib here, too.