How to use version-compare - 10 common examples

To help you get started, we’ve selected a few version-compare examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rfink / verdict.js / lib / comparison / index.js View on Github external
exports.gteVersion = function gteVersion(a, b) {
  var cmp = versionCompare(a, b);
  return cmp === 0 || cmp === -1;
};
github rfink / verdict.js / dist / verdict.js View on Github external
exports.gtVersion = function gtVersion(a, b) {
  return versionCompare(a, b) === -1;
};
github rfink / verdict.js / dist / verdict.js View on Github external
exports.ltVersion = function ltVersion(a, b) {
  return versionCompare(a, b) === 1;
};
github rfink / verdict.js / lib / comparison / index.js View on Github external
exports.ltVersion = function ltVersion(a, b) {
  return versionCompare(a, b) === 1;
};
github rfink / verdict.js / lib / comparison / index.js View on Github external
exports.lteVersion = function lteVersion(a, b) {
  var cmp = versionCompare(a, b);
  return cmp === 0 || cmp === 1;
};
github rfink / verdict.js / lib / comparison / index.js View on Github external
exports.eqVersion = function eqVersion(a, b) {
  return versionCompare(a, b) === 0;
};
github rfink / verdict.js / lib / comparison / index.js View on Github external
exports.gtVersion = function gtVersion(a, b) {
  return versionCompare(a, b) === -1;
};
github rfink / verdict.js / dist / verdict.js View on Github external
exports.lteVersion = function lteVersion(a, b) {
  var cmp = versionCompare(a, b);
  return cmp === 0 || cmp === 1;
};
github rfink / verdict.js / dist / verdict.js View on Github external
exports.eqVersion = function eqVersion(a, b) {
  return versionCompare(a, b) === 0;
};
github rfink / verdict.js / dist / verdict.js View on Github external
exports.gteVersion = function gteVersion(a, b) {
  var cmp = versionCompare(a, b);
  return cmp === 0 || cmp === -1;
};

version-compare

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

Artistic-2.0
Latest version published 10 months ago

Package Health Score

65 / 100
Full package analysis

Popular version-compare functions