Gathering detailed insights and metrics for version-compare
Gathering detailed insights and metrics for version-compare
Gathering detailed insights and metrics for version-compare
Gathering detailed insights and metrics for version-compare
npm install version-compare
Typescript
Module System
Min. Node Version
Node Version
NPM Version
88.4
Supply Chain
100
Quality
76.2
Maintenance
100
Vulnerability
100
License
TypeScript (84.71%)
JavaScript (15.29%)
Total Downloads
6,755,355
Last Day
303
Last Week
4,695
Last Month
23,169
Last Year
194,510
NOASSERTION License
2 Stars
28 Commits
2 Watchers
1 Branches
2 Contributors
Updated on Oct 12, 2024
Minified
Minified + Gzipped
Latest Version
3.11.0
Package Id
version-compare@3.11.0
Unpacked Size
45.71 kB
Size
12.00 kB
File Count
19
NPM Version
10.2.3
Node Version
20.10.0
Published on
Jan 07, 2024
Cumulative downloads
Total Downloads
Last Day
-37.5%
303
Compared to previous day
Last Week
-2.4%
4,695
Compared to previous week
Last Month
6%
23,169
Compared to previous month
Last Year
-14.5%
194,510
Compared to previous year
Comparator to determine if a version is less than, equivalent to, or greater than another version
1import versionCompare from 'version-compare' 2console.log(['1.1', '2', '1.0'].sort(versionCompare)) 3// 1.0, 1.1, 2
This package comprises this suite of related packages:
And if you are specifically interested in Node.js and ECMAScript versions:
npm install --save version-compare
import pkg from ('version-compare')
const pkg = require('version-compare').default
1import pkg from 'https://unpkg.com/version-compare@^3.11.0/edition-deno/index.ts'
1<script type="module"> 2 import pkg from '//cdn.skypack.dev/version-compare@^3.11.0' 3</script>
1<script type="module"> 2 import pkg from '//unpkg.com/version-compare@^3.11.0' 3</script>
1<script type="module"> 2 import pkg from '//dev.jspm.io/version-compare@3.11.0' 3</script>
This package is published with the following editions:
version-compare
aliases version-compare/index.cjs
which uses the Editions Autoloader to automatically select the correct edition for the consumer's environmentversion-compare/source/index.ts
is TypeScript source code with Import for modulesversion-compare/edition-browsers/index.js
is TypeScript compiled against ES2022 for web browsers with Import for modulesversion-compare/edition-es2022/index.js
is TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modulesversion-compare/edition-es5/index.js
is TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modulesversion-compare/edition-es2022-esm/index.js
is TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modulesversion-compare/edition-types/index.d.ts
is TypeScript compiled Types with Import for modulesversion-compare/edition-deno/index.ts
is TypeScript source code made to be compatible with DenoDiscover the release history by heading on over to the HISTORY.md
file.
Discover how to contribute via the CONTRIBUTING.md
file.
Unless stated otherwise all works are:
and licensed under:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/22 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More