concordancejs / concordance

Compare, format, diff and serialize any JavaScript value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document ArrayBuffer limitation in Node.js 4

novemberborn opened this issue · comments

The following throws a TypeError in Node.js 4:

const realm = vm.runInNewContext('(function () { return this })()')
Buffer.from(new realm.ArrayBuffer(8))

This means TypedArray / ArrayBuffer / DataView comparisons won't work across realms in that version. There is no efficient workaround, and it's a bit of an edge-case, so this should just be documented.