sp core library.version.lessthan - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki

Home > @microsoft/sp-core-library > Version > lessThan

Version.lessThan() method

Tests whether this version is less than (i.e. older than) the input parameter.

Signature:

lessThan(compareWith: Version): boolean;

Parameters

Parameter Type Description
compareWith Version The version to compare with

Returns:

boolean

A boolean indicating if this version is less than the input parameter

Remarks

Examples:

0.9.9 lessThan 1.0.0 -> true;
2.0   lessThan 2.0.0 -> false;
3.0   lessThan 3.0.1 -> true;
04.01 lessThan 4.1   -> false

⚠️ **GitHub.com Fallback** ⚠️