MCPcopy Create free account
hub / github.com/PowerShell/vscode-powershell / getItemIndex

Function getItemIndex

src/controls/checkboxQuickPick.ts:83–89  ·  view source on GitHub ↗
(
    items: ICheckboxQuickPickItem[],
    itemLabel: string,
)

Source from the content-addressed store, hash-verified

81}
82
83function getItemIndex(
84 items: ICheckboxQuickPickItem[],
85 itemLabel: string,
86): number {
87 const trimmedLabel = itemLabel.substring(itemLabel.indexOf("]") + 2);
88 return items.findIndex((item) => item.label === trimmedLabel);
89}
90
91function toggleSelection(item: ICheckboxQuickPickItem): void {
92 item.isSelected = !item.isSelected;

Callers 1

showInnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected