MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / addFavorite

Method addFavorite

src/helpViewer/packages.ts:124–129  ·  view source on GitHub ↗
(pkgName: string)

Source from the content-addressed store, hash-verified

122
123 // Function to add/remove packages from favorites
124 public addFavorite(pkgName: string): string[] {
125 this.pullFavoriteNames();
126 this.favoriteNames.add(pkgName);
127 this.pushFavoriteNames();
128 return [...this.favoriteNames.values()];
129 }
130 public removeFavorite(pkgName: string): string[] {
131 this.pullFavoriteNames();
132 this.favoriteNames.delete(pkgName);

Callers 1

_handleCommandMethod · 0.80

Calls 3

pullFavoriteNamesMethod · 0.95
pushFavoriteNamesMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected