Closed rotemdan closed 8 years ago
0.3.1
returned support for Buffer
objects used as inputs. Output is still always Uint8Array
.
0.3.2
adds an option for the return type to be set to "Buffer"
, which would convert the result to a node Buffer
. The default returned type for "ByteArray"
is still Uint8Array
.
Since the release of Node 4.1 it is not possible to easily patch a
Buffer
to behave like aUint8Array
sinceBuffer
is now internally derived fromUint8Array
and relies on its inherited methods likesubarray
andset
(which seems to be overridden by a function that always throws an error).In version
0.3.0
I removed all the polyfills and all outputs that have type identifierByteArray
are now instances ofUint8Array
. This is a breaking change for Node users who would need to applynew Uint8Array(inputBuffer)
andnew Buffer(outputUint8Array)
when buffer objects are desired as inputs or outputs.Automatic internal conversion of buffer inputs can be done and that would be added soon. Conversion of outputs to
Buffer
objects may be available under a different encoding identifier E.g.