constructor (contents, options) {
    // make the optional options non-optional
    options = options || {}
    // the size of the byte sequence in number of bytes
    this.size = 0 // contents, not allocation
    // the media type, as an ASCII-encoded string in lower case, and parsable as a MIME type
    this.type = ''
    // readability state (CLOSED: true, OPENED: false)
    this.isClosed = false
    // encoding of given strings
    this.encoding = 'utf8'
    // storage
    this.buffer = null
    this.length = 0 // allocation, not contents

    if (!contents) return
    if (!Array.isArray(contents)) return

    // Find content length
    contents.forEach((content) => {
      if (typeof (content) === 'string') {
        this.length += content.length
      } else if (content instanceof ArrayBuffer) {
        this.length += content.byteLength
      }
    })

    // process options if any
    if (options.type) {
      // TBD if type contains any chars outside range U+0020 to U+007E, then set type to the empty string
      // Convert every character in type to lowercase
      this.type = options.type.toLowerCase()
    }
    if (options.endings) {
      // convert the EOL on strings
    }
    if (options.encoding) {
      this.encoding = options.encoding.toLowerCase()
    }
    if (options.length) {
      this.length = options.length
    }

    let wbytes
    let object
    // convert the contents (String, ArrayBufferView, ArrayBuffer, Blob)
    // MAX_LENGTH : 2147483647
    this.buffer = Buffer.allocUnsafe(this.length) // new Buffer(this.length)
    for (let index = 0; index < contents.length; index++) {
      switch (typeof (contents[index])) {
        case 'string':
          wbytes = this.buffer.write(contents[index], this.size, this.encoding)
          this.size = this.size + wbytes
          break
        case 'object':
          object = contents[index] // this should be a reference to an object
          // FIXME if (Buffer.isBuffer(object)) { }
          if (object instanceof ArrayBuffer) {
            const view = new DataView(object)
            for (let bindex = 0; bindex < object.byteLength; bindex++) {
              const xbyte = view.getUint8(bindex)
              wbytes = this.buffer.writeUInt8(xbyte, this.size, false)
              this.size++
            }
          }
          break
        default:
          break
      }
    }
  }
Returns a newly created Blob object which contains a concatenation of all of the data in the given contents.
@param {Array} contents - an array of ArrayBuffer, or String objects that will be put inside the Blob.