diff --git a/doc/api/process.md b/doc/api/process.md index 060d741804df54..1bb8c01548acac 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -1544,16 +1544,28 @@ should not be relied upon to exist. added: REPLACEME --> -Perform a SemVer comparison to the release version. - * `major` {number} The major version to compare. * `minor` {number} The minor version to compare. * `patch` {number} The patch version to compare. * `tag` {string} The pre-release tag to compare. -* Returns: {number} `1` if the given version is lower than the current release - version, `0` if the given version matches the process version, and `-1` +* Returns: {number} `-1` if the given version is lower than the current release + version, `0` if the given version matches the process version, and `1` + if the given version is greater than the release version. + +Perform a SemVer comparison to the release version. + +## process.release.compareVersion(version) + + +* `version` {string} The semver version to compare. +* Returns: {number} `-1` if the given version is lower than the current release + version, `0` if the given version matches the process version, and `1` if the given version is greater than the release version. +Perform a SemVer comparison to the release version. + ## process.send(message[, sendHandle[, options]][, callback])