Currently, if the input type is Uint8Array, one needs to convert, or
one needs to leave the input unconverted, depending on the platform.
One particular problem is that in Node, input instanceof Uint8Array is
true both when input is of type Uint8Array and Buffer, but those
two still need to be treated differently.
With this change, users don't have to bother with detecting the
platform and converting the input anymore when
input instanceof Uint8Array === true.
Currently, if the input type is
Uint8Array
, one needs to convert, or one needs to leave the input unconverted, depending on the platform.One particular problem is that in Node,
input instanceof Uint8Array
istrue
both wheninput
is of typeUint8Array
andBuffer
, but those two still need to be treated differently.With this change, users don't have to bother with detecting the platform and converting the input anymore when
input instanceof Uint8Array === true
.