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

sp core library.version.greaterthan

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

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

Version.greaterThan() method

Tests whether this version is greater than (i.e. newer than) the input parameter.

Signature:

greaterThan(compareWith: Version): boolean;

Parameters

Parameter Type Description
compareWith Version The version to compare with

Returns:

boolean

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

Remarks

Examples:

1.0.0 greaterThan 0.0.9 -> true;
2.0   greaterThan 2.0.0 -> false;
3.0.1 greaterThan 3.0   -> true

Clone this wiki locally