mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 12:33:40 +00:00
19 lines
391 B
TypeScript
19 lines
391 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 {
|
|
if (!lhs || !rhs) return null
|
|
return emver.compare(lhs, rhs)
|
|
}
|
|
|
|
satisfies(version: string, range: string): boolean {
|
|
return emver.satisfies(version, range)
|
|
}
|
|
}
|