js-xxhash
js-xxhash copied to clipboard
Error
When using 'xxhash.js' or 'xxhash.min.js', I am getting the following error:
Uncaught TypeError: input.copy is not a function [at XXH.update (xxhash.js:2205)]
I tried to debug it on my own initially, but I can't follow what the problem is. My call looks like this:
var seed = 32;
XXH.h32(inputString, seed).toString(16);
Please let me know if I can provide any other information.
It looks like your input string is not detected as such: in the code, it checks for a native js string or arraybuffer otherwise it defaults to a node buffer object which has the copy method. Try converting your input to one of those first.