Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.version.lessthan

John Nguyen edited this page Apr 22, 2021 · 2 revisions

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

Clone this wiki locally