{
  "$schema": "https://doc-kit.nodejs.org/schemas/api-doc/1.0.1.json",
  "id": "newest",
  "path": "/newest",
  "type": "module",
  "module": "newest",
  "title": "`@nodevu/newest`",
  "introducedIn": null,
  "sourceLink": {
    "path": "newest/index.js",
    "url": "https://github.com/cutenode/nodevu/blob/main/newest/index.js"
  },
  "stability": null,
  "added": [],
  "deprecated": [],
  "removed": [],
  "napiVersion": [],
  "changes": [],
  "description": "Finds the newest LTS or security release of a Node.js release line.\n\n```bash\nnpm install @nodevu/newest\n```\n\nPass it the name of a release line:\n\n```js\nconst { lts, security } = require('@nodevu/newest');\n\nawait lts('v16'); // '16.20.2'\nawait security('v16'); // '16.20.2'\n```\n\nEvery function fetches fresh data through [`@nodevu/core`](core.html), and\nfulfills with `undefined` when there's no such release: the line has no LTS\nreleases (like `v25` or `v0.10`), no security releases (like `v5`), or\ndoesn't exist (like `v999`). [`@nodevu/oldest`](oldest.html) finds the oldest\nones.",
  "summary": "Finds the newest LTS or security release of a Node.js release line.",
  "examples": [
    {
      "language": "bash",
      "displayName": null,
      "code": "npm install @nodevu/newest"
    },
    {
      "language": "js",
      "displayName": null,
      "code": "const { lts, security } = require('@nodevu/newest');\n\nawait lts('v16'); // '16.20.2'\nawait security('v16'); // '16.20.2'"
    }
  ],
  "children": [
    {
      "kind": "method",
      "id": "newestname-type-options",
      "name": "newest",
      "title": "`newest(name, type[, options])`",
      "scope": "module",
      "overloadOf": null,
      "stability": null,
      "added": [],
      "deprecated": [],
      "removed": [],
      "napiVersion": [],
      "changes": [],
      "signature": {
        "parameters": [
          {
            "name": "name",
            "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 line, such as `'v16'` or `'v0.10'`.",
            "default": null,
            "optional": false,
            "rest": false,
            "properties": []
          },
          {
            "name": "type",
            "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": "`'lts'` or `'security'`. Any other value fulfills with\n`undefined`.",
            "default": null,
            "optional": false,
            "rest": false,
            "properties": []
          },
          {
            "name": "options",
            "type": {
              "text": "Object",
              "links": [
                {
                  "name": "Object",
                  "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                  "start": 0,
                  "end": 6
                }
              ]
            },
            "description": "Passed to [`nodevu()`](core.html#nodevuoptions), to set a\ncustom `fetch` or `now`.",
            "default": null,
            "optional": true,
            "rest": false,
            "properties": []
          }
        ],
        "returns": {
          "type": {
            "text": "Promise<string | undefined>",
            "links": [
              {
                "name": "Promise",
                "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
                "start": 0,
                "end": 7
              },
              {
                "name": "string",
                "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type",
                "start": 8,
                "end": 14
              },
              {
                "name": "undefined",
                "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type",
                "start": 17,
                "end": 26
              }
            ]
          },
          "description": "Fulfills with the version, without its\n`v`."
        }
      },
      "description": "",
      "summary": "",
      "examples": [],
      "children": []
    },
    {
      "kind": "method",
      "id": "ltsname-options",
      "name": "lts",
      "title": "`lts(name[, options])`",
      "scope": "module",
      "overloadOf": null,
      "stability": null,
      "added": [],
      "deprecated": [],
      "removed": [],
      "napiVersion": [],
      "changes": [],
      "signature": {
        "parameters": [
          {
            "name": "name",
            "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 line, such as `'v16'`.",
            "default": null,
            "optional": false,
            "rest": false,
            "properties": []
          },
          {
            "name": "options",
            "type": {
              "text": "Object",
              "links": [
                {
                  "name": "Object",
                  "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                  "start": 0,
                  "end": 6
                }
              ]
            },
            "description": "Passed to [`nodevu()`](core.html#nodevuoptions).",
            "default": null,
            "optional": true,
            "rest": false,
            "properties": []
          }
        ],
        "returns": {
          "type": {
            "text": "Promise<string | undefined>",
            "links": [
              {
                "name": "Promise",
                "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
                "start": 0,
                "end": 7
              },
              {
                "name": "string",
                "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type",
                "start": 8,
                "end": 14
              },
              {
                "name": "undefined",
                "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type",
                "start": 17,
                "end": 26
              }
            ]
          },
          "description": "Fulfills with the newest LTS release\nof the line."
        }
      },
      "description": "Same as `newest(name, 'lts', options)`.",
      "summary": "Same as `newest(name, 'lts', options)`.",
      "examples": [],
      "children": []
    },
    {
      "kind": "method",
      "id": "securityname-options",
      "name": "security",
      "title": "`security(name[, options])`",
      "scope": "module",
      "overloadOf": null,
      "stability": null,
      "added": [],
      "deprecated": [],
      "removed": [],
      "napiVersion": [],
      "changes": [],
      "signature": {
        "parameters": [
          {
            "name": "name",
            "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 line, such as `'v16'`.",
            "default": null,
            "optional": false,
            "rest": false,
            "properties": []
          },
          {
            "name": "options",
            "type": {
              "text": "Object",
              "links": [
                {
                  "name": "Object",
                  "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object",
                  "start": 0,
                  "end": 6
                }
              ]
            },
            "description": "Passed to [`nodevu()`](core.html#nodevuoptions).",
            "default": null,
            "optional": true,
            "rest": false,
            "properties": []
          }
        ],
        "returns": {
          "type": {
            "text": "Promise<string | undefined>",
            "links": [
              {
                "name": "Promise",
                "href": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise",
                "start": 0,
                "end": 7
              },
              {
                "name": "string",
                "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#string_type",
                "start": 8,
                "end": 14
              },
              {
                "name": "undefined",
                "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#undefined_type",
                "start": 17,
                "end": 26
              }
            ]
          },
          "description": "Fulfills with the newest security\nrelease of the line."
        }
      },
      "description": "Same as `newest(name, 'security', options)`.",
      "summary": "Same as `newest(name, 'security', options)`.",
      "examples": [],
      "children": []
    }
  ]
}