Class Version

Index

Methods

Methods

public static compare(current?: string, target?: string): number

[Method] Compare 2 specified versions starting from left to right

Parameters

  • current?: string optional

    String The current version to compare to.

  • target?: string optional

    String The target version to compare to.

Returns

number

Number Returns -1 if the current version is smaller than the target version, 1 if greater, and 0 if they're equivalent.

public static getComponentValue(value?: any): any

[Method] Converts a version component to a comparable value

Parameters

  • value?: any optional

    Object The value to convert

Returns

any

Object