Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 565 Bytes

README.md

File metadata and controls

16 lines (11 loc) · 565 Bytes

smart-vercomp Build Status

A smarter version comparison library

This is a clone of the upstream_cmp function in https://github.com/fedora-infra/anitya in JavaScript. A big thanks to @pypingou for the original code in python.

Usage

var vercomp = require('smartvercomp')
vercomp('1.0.rc1', '1.0') # return 1
vercomp('1.0.0', '1.0.1') # return -1
vercomp('10b2', '10a1')   # return 1
vercomp('1', '1')         # return 0

LICENSE MIT