(choice: Choice)
| 104 | scope: { kind: folder ? 'folder' : 'file', path: path.replace(/\/$/, ''), name: path } }); |
| 105 | } |
| 106 | const priority = (choice: Choice) => searchPriority(choice, needle); |
| 107 | const unique = new Map(choices.map(choice => [choice.key, choice])); |
| 108 | for (const choice of remote) if (!unique.has(choice.key)) unique.set(choice.key, choice); |
| 109 | return [...unique.values()].sort((a, b) => priority(a) - priority(b) || a.name.localeCompare(b.name)).slice(0, 12); |
no test coverage detected