{
  "doc": {
    "id": "api/utilities/minimatch",
    "title": "Cypress.minimatch | Cypress Documentation",
    "description": "Cypress automatically includes minimatch and exposes it as `Cypress.minimatch`.",
    "section": "api",
    "source_path": "/llm/markdown/api/utilities/minimatch.md",
    "version": "3cf5b86b3403f604bdf7f3e35025c3bc3865e02c",
    "updated_at": "2026-05-07T17:44:31.931Z",
    "headings": [
      {
        "id": "api/utilities/minimatch#cypress-minimatch",
        "text": "Cypress.minimatch",
        "level": 1
      },
      {
        "id": "api/utilities/minimatch#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/utilities/minimatch#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/utilities/minimatch#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/utilities/minimatch#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "api/utilities/minimatch#syntax",
      "doc_id": "api/utilities/minimatch",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\nCypress.minimatch(target: string, pattern: string, options?: MinimatchOptions);\n```\n\n### Usage\n\n**Correct Usage**\n\n```\nCypress.minimatch('/users/1/comments/2', '/users/*/comments', {  matchBase: true,})\n```\n\n**Incorrect Usage**\n\n```\ncy.minimatch() // Errors, cannot be chained off 'cy'\n```\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/utilities/minimatch.json",
      "token_estimate": 44
    },
    {
      "id": "api/utilities/minimatch#examples",
      "doc_id": "api/utilities/minimatch",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\nBy default Cypress uses `minimatch` to test glob patterns against request URLs.\n\nIf you're struggling with writing the correct pattern you can iterate much faster by testing directly in your Developer Tools console.\n\n```\n// test that the glob you're writing matches the request's url// returns trueCypress.minimatch('/users/1/comments', '/users/*/comments', {  matchBase: true,})// returns falseCypress.minimatch('/users/1/comments/2', '/users/*/comments', {  matchBase: true,})\n```\n\nWe're adding the `{ matchBase: true }` option because under the hood Cypress actually uses that option by default.\n\nNow let's test out `**` support.\n\n```\n// ** matches against all downstream path segments// returns trueCypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/**', {  matchBase: true,})// whereas * matches only the next path segment// returns falseCypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/*', {  matchBase: false,})\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/utilities/minimatch.json",
      "token_estimate": 153
    }
  ]
}