Closed Gozala closed 3 years ago
At the moment passing a block Uint8Array throws an exception
Uint8Array
https://github.com/ipld/js-ipld-block/blob/7059cc8370e44cc9d9bc4ed73b3836acf38b0a05/src/index.js#L17-L21
I would like to propose a change that recognizes Uint8Array and if it is passed instead of throwing it creates a Buffer view for the same underlying ArrayBuffer
Buffer
ArrayBuffer
Fixed by https://github.com/ipld/js-ipld-block/pull/53.
should this be closed ?
At the moment passing a block
Uint8Array
throws an exceptionhttps://github.com/ipld/js-ipld-block/blob/7059cc8370e44cc9d9bc4ed73b3836acf38b0a05/src/index.js#L17-L21
I would like to propose a change that recognizes
Uint8Array
and if it is passed instead of throwing it creates aBuffer
view for the same underlyingArrayBuffer