Skip to content

Commit

Permalink
Layout: Accept Uint8Array type wherever the API expects a Buffer
Browse files Browse the repository at this point in the history
Loosen Buffer type checks to accept the Uint8Array base class.
Uint8Array is preferred over Buffer due to its presence in both
Node.js and browser environments. When Buffer methods are needed,
create a new Buffer instance which uses the same underyling
memory of the Uint8Array parameter.

Signed-off-by: Justin Starry <justin@solana.com>
  • Loading branch information
jstarry committed Jul 10, 2021
1 parent 6bcbd82 commit 73ba6cc
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## [1.2.2] - 2021-07-05

* Improve [browser compatibility][pr#26] by eliminating a dependence on
* Improve [browser compatibility][pr#27] by eliminating a dependence on
the Node assert module.

## [1.2.1] - 2021-04-29
Expand Down
Loading

0 comments on commit 73ba6cc

Please sign in to comment.