mscdex / node-xxhash

An xxhash binding for node.js
Other
193 stars 28 forks source link

Update method description in README.md #16

Closed laurenkt closed 2 years ago

laurenkt commented 7 years ago

The description previously said seed can be an unsigned integer. This is not true for all unsigned integers, using a 64-bit integer would produce TypeError: invalid seed argument. Made it clearer that the argument requires a 32-bit integer.

laurenkt commented 7 years ago

As a note to anyone who wants to convert a 64-bit uint to a 32-bit uint in Javascript, this SO answer explains why this works:

var 32bit_int = some_64bit_int >>> 0