serialize-javascript
serialize-javascript copied to clipboard
Support for buffers
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Buffer
is implemented only for Node.js. I think supporting TypedArray
is better.
Buffer is implemented only for Node.js. I think supporting TypedArray is better.
Agree! disapprove of this PR
Speaking of... the package randombytes uses safe-buffer which brings in Buffer into the browser anyway? Could you use a version that don't depend on it? Simply use Uint8Array + crypto.getRandomValues instead?
...or if it isn't super critical to be hyper uniq maybe Math.random is sufficient?