apps-script-utils 2.1.1 Help

isVersionCompatible

function isVersionCompatible(currentVersion: string, requiredVersion: string): boolean;

versionCompare decides it, so the comparison is numeric group by group and 1.10 counts as above 1.2. Both arguments have to be plain dotted numbers; a pre-release suffix is rejected rather than ordered.

Parameters

Parameter

Type

Description

currentVersion

string

The version in hand.

requiredVersion

string

The minimum that is acceptable.

Returns

boolean — true when the current version is the required one or higher.

Throws

Exception

Condition

TypeError

either argument is not a valid version string.

Examples

Checking a requirement

isVersionCompatible("1.3.0", "1.2.0"); // => true isVersionCompatible("1.2.0", "1.3.0"); // => false

See also

Source

src/lang/string/isVersionCompatible.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.