Function searchBySubregion

  • Type Parameters

    Parameters

    • subregion: string

      The subregion to search for

    • Optional options: {
          fields?: F[];
      }

      The options

      • Optional fields?: F[]

        The fields to keep in the response

    Returns Promise<Nullable<Pick<Country, F>[]>>

    The matching countries

    Description

    Search among the countries by their subregion

    Example

    const countries = await searchBySubregion('southern europe');
    const countries = await searchBySubregion('southern europe', { fields: ['name', 'capital'] });