concordancejs / concordance

Compare, format, diff and serialize any JavaScript value
ISC License
207 stars 15 forks source link

Document ArrayBuffer limitation in Node.js 4 #3

Closed novemberborn closed 5 years ago

novemberborn commented 7 years ago

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.