Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Error #17

Open
dbudde opened this issue Aug 11, 2017 · 1 comment
Open

Error #17

dbudde opened this issue Aug 11, 2017 · 1 comment

Comments

@dbudde
Copy link

dbudde commented Aug 11, 2017

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.

@pierrec
Copy link
Owner

pierrec commented Aug 27, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants