{"id":17050450,"url":"https://github.com/eush77/semver-max","last_synced_at":"2025-04-12T16:23:35.401Z","repository":{"id":71616443,"uuid":"39397579","full_name":"eush77/semver-max","owner":"eush77","description":"Find maximum (or minimum) version according to semver","archived":false,"fork":false,"pushed_at":"2015-07-20T17:21:31.000Z","size":120,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T10:48:10.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eush77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-20T17:16:57.000Z","updated_at":"2019-07-15T20:59:05.000Z","dependencies_parsed_at":"2023-02-23T20:45:18.748Z","dependency_job_id":null,"html_url":"https://github.com/eush77/semver-max","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eush77%2Fsemver-max","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eush77%2Fsemver-max/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eush77%2Fsemver-max/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eush77%2Fsemver-max/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eush77","download_url":"https://codeload.github.com/eush77/semver-max/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248594373,"owners_count":21130355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T09:56:55.520Z","updated_at":"2025-04-12T16:23:35.371Z","avatar_url":"https://github.com/eush77.png","language":"JavaScript","readme":"[![npm](https://nodei.co/npm/semver-max.png)](https://npmjs.com/package/semver-max)\n\n# semver-max\n\n[![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]\n\nFind maximum (or minimum) version according to semver.\n\n[travis]: https://travis-ci.org/eush77/semver-max\n[travis-badge]: https://travis-ci.org/eush77/semver-max.svg\n[david]: https://david-dm.org/eush77/semver-max\n[david-badge]: https://david-dm.org/eush77/semver-max.png\n\n## Usage\n\nPass versions in the arguments:\n\n```js\nsemverMax('0.0.0', '0.1.0', '1.0.0')\n//=\u003e '1.0.0'\n```\n\nOr reduce over an array:\n\n```js\n['0.0.0', '0.1.0', '1.0.0'].reduce(semverMax)\n//=\u003e '1.0.0'\n```\n\n## API\n\n#### `semverMax(version1, version2, ...)`\n\nReturns the maximum version.\n\n#### `semverMax.gt(version1, version2, ...)`\n#### `semverMax.gte(version1, version2, ...)`\n#### `semverMax.lt(version1, version2, ...)`\n#### `semverMax.lte(version1, version2, ...)`\n\nUse a different comparator (see [npm/node-semver]).\n\n`semverMax.gt` computes the maximum (the other name for `semverMax`), `semverMax.lt` computes the minimum instead.\n\nThe difference between `semverMax.gt` and `semverMax.gte` (or `semverMax.lt` and `semverMax.lte`) is a bit more subtle:\n\n```js\nsemverMax.gt('0.0.0', '1.0.0', 'v0.1.0', 'v1.0.0')\n//=\u003e '1.0.0'\n\nsemverMax.gte('0.0.0', '1.0.0', 'v0.1.0', 'v1.0.0')\n//=\u003e 'v1.0.0'\n```\n\n[npm/node-semver]: https://github.com/npm/node-semver#comparison\n\n## Install\n\n```\nnpm install semver-max\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":["Modules","模块"],"sub_categories":["Semver"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feush77%2Fsemver-max","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feush77%2Fsemver-max","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feush77%2Fsemver-max/lists"}