mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-11 11:19:26 +00:00
fixed fuzzy. added proper boost.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -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 {
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user