Files
start-os/frontend/projects/shared/src/services/emver.service.ts
waterplea 0390954a85 feat: enable strictNullChecks
feat: enable `noImplicitAny`

chore: remove sync data access

fix loading package data for affected dependencies

chore: properly get alt marketplace data

update patchdb client to allow for emit on undefined values
2022-06-19 13:46:09 -06:00

19 lines
398 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 | null {
if (!lhs || !rhs) return null
return emver.compare(lhs, rhs)
}
satisfies(version: string, range: string): boolean {
return emver.satisfies(version, range)
}
}