code: function _looksLikeAYError(err) {
    return err instanceof YError || (
       err.constructor &&
       err.constructor.name &&
       err.constructor.name.endsWith('Error') &&
      'string' === typeof err.code && _looksLikeAYErrorCode(err.code) &&
      err.params && err.params instanceof Array
    );
  }
docs: In order to keep compatibility through major versions we have to make kind of an cross major version instanceof