npm install version-compare
import compare from 'version-compare'
compare('7.2.1', '7.6.1') // return false
compare('3.8.3', '2.6') // return true
like the name, this library is used to compare the version,just be useful for the format like 'Major.Minor.Patch'.