Options
All
  • Public
  • Public/Protected
  • All
Menu

us-presidents

Index

Type Aliases

Party: "Republican" | "Democrat" | "Whig" | "Democratic-Republican" | "Federalist" | "National Union"

The party type, used in President interface and searchPresidentsByParty() function.

Variables

presidents: President[] = ...

Array of objects containing data about presidents.

Functions

  • Finds a president using their exact name (as used in our data sample).

    Parameters

    • name: string

    Returns President

  • Searches presidents by name.

    note

    Returns a empty array if no presidents are found.

    deprecated

    Please implement your own search function, so you can get the behavior you expect. Consider using findPresident() if you have the president's full name instead.

    Parameters

    • query: string

    Returns President[]

Generated using TypeDoc