code: function magicBuffer(buf, cb) {
    try {
      buf = bufferUtils.toBuffer(buf);
      magic(buf, cb);
    } catch(err) {
      cb(err);
    }
  }
docs: Detect mime-type for the Buffer
  @param {Buffer|ArrayBuffer|Uint8Array} buf Data buffer
  @param {function} cb Callback to invoke on completion