packages/fbjs/src/useragent/VersionRange.js
function compareComponents(a, b) {
  const [aNormalized, bNormalized] = normalizeVersions(a, b);

  for (let i = 0; i < bNormalized.length; i++) {
    const result = compareNumeric(aNormalized[i], bNormalized[i]);
    if (result) {
      return result;
    }
  }

  return 0;
}
function compareComponents(a, b) {
  const [aNormalized, bNormalized] = normalizeVersions(a, b);

  for (let i = 0; i < bNormalized.length; i++) {
    const result = compareNumeric(aNormalized[i], bNormalized[i]);
    if (result) {
      return result;
    }
  }

  return 0;
}
function compareComponents ( a , b ) { const [ aNormalized , bNormalized ] = normalizeVersions ( a , b ) ; for ( let i = 0 ; i < bNormalized . length ; i ++ ) { const result = compareNumeric ( aNormalized [ i ] , bNormalized [ i ] ) ; if ( result ) { return result ; } } return 0 ; }
Compares arrays of version components.

@param {array<string>} a
@param {array<string>} b
@returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to,
or greater than `b`, respectively
Compares arrays of version components .