You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The question it raises is whether that would mean 1) exporting the ArrayBuffer type from this package, 2) adding a dependency to purescript-arraybuffer-types, or 3) moving this functionality somewhere else (or does it exist somewhere else already?)
My feeling is that option 2) makes some sense, though it's breaking.
Activity
matthewleon commentedon Nov 5, 2017
On further thought, perhaps the smartest way is to add the dependency and export
toUint8Array, defined simply as anunsafeCoerce.matthewleon commentedon Nov 6, 2017
On third thought, using
unsafeCoerceto get aUint8Arrayis unwise because of a couple of subtle differences between the two types, as explained here: https://nodejs.org/docs/latest/api/buffer.html#buffer_buffers_and_typedarrayThe initial
ArrayBufferidea should work though.toArrayBuffer. resolves purescript-node#22
Merge pull request #27 from matthewleon/toArrayBuffer