semverbs

1.1.1 • Public • Published

semverbs

Tiny utility lib for parsing and comparing semantic versions

  • 35 lines of code
  • no dependencies
  • 100% test coverage
  • suitable for browser and nodejs
  • fast

installation

npm install semverbs

usage

 var sv = require('semverbs')
 sv.eq('3', '3.0.0') // true
 sv.gt('3.0.1', '3.0.0') // true
 sv.lt('3.0.1', '3.2.0') // true
 sv.parse('3.2.1') // { major: 3, minor: 2, patch: 1 }
 ['1.2.2', '1.2.1', '1.2.3'].sort(sv.compare) // ['1.2.1', '1.2.2', '1.2.3']

run tests

npm test

js-standard-style

Readme

Keywords

Package Sidebar

Install

npm i semverbs

Weekly Downloads

48

Version

1.1.1

License

MIT

Unpacked Size

6.13 kB

Total Files

9

Last publish

Collaborators

  • alz