Comparing version 0.9.1 to 0.9.2
@@ -0,1 +1,11 @@ | ||
<a name="0.9.2"></a> | ||
## [0.9.2](https://github.com/ipld/js-ipld-block/compare/v0.9.1...v0.9.2) (2020-06-12) | ||
### Features | ||
* add Uint8Array support ([418eb5f](https://github.com/ipld/js-ipld-block/commit/418eb5f)) | ||
<a name="0.9.1"></a> | ||
@@ -2,0 +12,0 @@ ## [0.9.1](https://github.com/ipld/js-ipld-block/compare/v0.9.0...v0.9.1) (2020-04-01) |
{ | ||
"name": "ipld-block", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "JavaScript Implementation of IPLD Block", | ||
@@ -58,2 +58,3 @@ "leadMaintainer": "Volker Mische <volker.mische@gmail.com>", | ||
"Hugo Dias <hugomrdias@gmail.com>", | ||
"Irakli Gozalishvili <contact@gozala.io>", | ||
"Richard Littauer <richard.littauer@gmail.com>", | ||
@@ -60,0 +61,0 @@ "Richard Schneider <makaretu@gmail.com>", |
@@ -19,4 +19,6 @@ 'use strict' | ||
constructor (data, cid) { | ||
if (!data || !Buffer.isBuffer(data)) { | ||
throw new Error('first argument must be a buffer') | ||
if (!data || !ArrayBuffer.isView(data)) { | ||
throw new Error('first argument must be a buffer or typed array') | ||
} else if (!Buffer.isBuffer(data)) { | ||
data = Buffer.from(data.buffer, data.byteOffset, data.byteLength) | ||
} | ||
@@ -23,0 +25,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
781077
5915