paroga / cbor-js

The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle ArrayBuffer encoding

apowers313 opened this issue · comments

Currently if an attribute in a JSON object being encoded is of type ArrayBuffer, it is silently ignored. It would be nice if somewhere around line 158, encode detected that the type was ArrayBuffer and promoted it to a Uint8Array to be encoded properly.

The same request may apply for handling other TypedArrays and DataViews.