mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
19 lines
389 B
TypeScript
19 lines
389 B
TypeScript
import { Injectable } from '@angular/core'
|
|
import * as emver from '@start9labs/emver'
|
|
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class Emver {
|
|
constructor () { }
|
|
|
|
compare (lhs: string, rhs: string): number {
|
|
const compare = emver.compare(lhs, rhs)
|
|
return compare
|
|
}
|
|
|
|
satisfies (version: string, range: string): boolean {
|
|
return emver.satisfies(version, range)
|
|
}
|
|
} |