# Function matchState

- matchState(state, criterion, transition): boolean
- `Internal`

  Determines if the given state matches the matchCriteria

  #### Parameters

  - state: any

    a State Object to test against

  - criterion: any

    If a string, matchState uses the string as a glob-matcher against the state name

    - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name and returns a positive match if any of the globs match.
    - If a function, matchState calls the function with the state and returns true if the function's result is truthy.
  - transition: any

  #### Returns boolean

  - Defined in router/transition/hook-registry.js:18