1.1.1 • Published 6 years ago

semverbs v1.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

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

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago