mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
21 lines
437 B
TypeScript
21 lines
437 B
TypeScript
import { Injectable } from '@angular/core'
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class Emver {
|
|
private e: typeof import('@start9labs/emver')
|
|
constructor () { }
|
|
|
|
async init () {
|
|
this.e = await import('@start9labs/emver')
|
|
}
|
|
|
|
compare (lhs: string, rhs: string): number {
|
|
return this.e.compare(lhs, rhs)
|
|
}
|
|
|
|
satisfies (version: string, range: string): boolean {
|
|
return this.e.satisfies(version, range)
|
|
}
|
|
} |