egg-version-compare
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

egg-version-compare

Comparator to determine if a version is less than, equivalent to, or greater than another version

Usage

import versionCompare from 'egg-version-compare'
console.log(['1.1', '2', '1.0'].sort(versionCompare))
// 1.0, 1.1, 2

Install

npm

  • Install: npm install --save egg-version-compare
  • Import: import pkg from ('egg-version-compare')
  • Require: const pkg = require('egg-version-compare').default

License

[MIT]

Package Sidebar

Install

npm i egg-version-compare

Weekly Downloads

30

Version

1.0.2

License

Artistic-2.0

Unpacked Size

22.7 kB

Total Files

12

Last publish

Collaborators

  • pet_granch