code: function isArrayBuffer (obj) {
    return obj instanceof ArrayBuffer ||
      (obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&
        typeof obj.byteLength === 'number')
  }
docs: copied from github.com/feross/buffer Some ArrayBuffers are not passing the instanceof check, so we need to do a bit more work :(