{
  "$schema": "https://doc-kit.nodejs.org/schemas/api-doc/1.0.1.json",
  "id": "parsefiles",
  "path": "/parsefiles",
  "type": "module",
  "module": "parsefiles",
  "title": "`@nodevu/parsefiles`",
  "introducedIn": null,
  "sourceLink": {
    "path": "parsefiles/index.js",
    "url": "https://github.com/cutenode/nodevu/blob/main/parsefiles/index.js"
  },
  "stability": null,
  "added": [],
  "deprecated": [],
  "removed": [],
  "napiVersion": [],
  "changes": [],
  "description": "Parses an identifier from the `files` of a release in the\n[Node.js release index](https://nodejs.org/dist/index.json), such as\n`linux-x64` or `osx-arm64-tar`, into the file names it stands for, its\nplatform, and its architecture. [`@nodevu/core`](core.html) uses it for\n[`release.files`](core.html#releasefiles).\n\n```bash\nnpm install @nodevu/parsefiles\n```\n\nPass it an identifier and the version it belongs to:\n\n```js\nconst parsefiles = require('@nodevu/parsefiles');\n\nparsefiles('linux-x64', '17.6.0');\n// {\n//   id: 'linux-x64',\n//   files: ['node-v17.6.0-linux-x64.tar.gz', 'node-v17.6.0-linux-x64.tar.xz'],\n//   type: 'linux',\n//   architecture: 'x64',\n// }\n```",
  "summary": "Parses an identifier from the `files` of a release in the Node.js release index, such as `linux-x64` or `osx-arm64-tar`, into the file names it stands for, its platform, and its architecture. `@nodevu/core` uses it for `release.files`.",
  "examples": [
    {
      "language": "bash",
      "displayName": null,
      "code": "npm install @nodevu/parsefiles"
    },
    {
      "language": "js",
      "displayName": null,
      "code": "const parsefiles = require('@nodevu/parsefiles');\n\nparsefiles('linux-x64', '17.6.0');\n// {\n//   id: 'linux-x64',\n//   files: ['node-v17.6.0-linux-x64.tar.gz', 'node-v17.6.0-linux-x64.tar.xz'],\n//   type: 'linux',\n//   architecture: 'x64',\n// }"
    }
  ],
  "children": [
    {
      "kind": "method",
      "id": "parsefilesfile-version",
      "name": "parsefiles",
      "title": "`parsefiles(file, version)`",
      "scope": "module",
      "overloadOf": null,
      "stability": null,
      "added": [],
      "deprecated": [],
      "removed": [],
      "napiVersion": [],
      "changes": [],
      "signature": {
        "parameters": [
          {
            "name": "file",
            "type": {
              "text": "string",
              "links": [
                {
                  "name": "string",
                  "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type",
                  "start": 0,
                  "end": 6
                }
              ]
            },
            "description": "An identifier from the release's `files`, such as\n`'win-x64-msi'`.",
            "default": null,
            "optional": false,
            "rest": false,
            "properties": []
          },
          {
            "name": "version",
            "type": {
              "text": "string",
              "links": [
                {
                  "name": "string",
                  "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type",
                  "start": 0,
                  "end": 6
                }
              ]
            },
            "description": "The release's version, without its `v`, such as\n`'17.6.0'`.",
            "default": null,
            "optional": false,
            "rest": false,
            "properties": []
          }
        ],
        "returns": {
          "type": {
            "text": "Object",
            "links": [
              {
                "name": "Object",
                "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                "start": 0,
                "end": 6
              }
            ]
          },
          "description": ""
        }
      },
      "description": "The file names follow the patterns nodejs.org has used so far. New kinds of\nidentifiers can show up in the index before this module knows them.",
      "summary": "The file names follow the patterns nodejs.org has used so far. New kinds of identifiers can show up in the index before this module knows them.",
      "examples": [],
      "children": []
    }
  ]
}