fixed fuzzy. added proper boost.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-07-22 11:33:28 +02:00
parent fdc5814e66
commit 8aa08cbf6e
7 changed files with 436 additions and 37 deletions

View File

@@ -276,6 +276,7 @@ export interface Programmer {
readonly id: string;
}
export namespace Programmer {
export function equals(left: Programmer | undefined, right: Programmer | undefined): boolean {
if (!left) {
return !right;
@@ -285,6 +286,15 @@ export namespace Programmer {
}
return left.id === right.id && left.name === right.name && left.platform === right.platform;
}
export function toString({ id, platform }: Programmer): string {
const [vendor,] = platform.split('@');
if (!vendor) {
throw new Error(`Could not extract vendor from platform: '${platform}'.`);
}
return `${vendor}:${id}`;
}
}
export namespace Board {
@@ -357,5 +367,4 @@ export namespace Board {
}));
}
}