MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / getItemsHashes

Method getItemsHashes

js/botasaurus-js/src/cache.ts:189–198  ·  view source on GitHub ↗
(func: Function | string, items?: any[])

Source from the content-addressed store, hash-verified

187 }
188
189 static getItemsHashes(func: Function | string, items?: any[]): string[] {
190 const results = getCachedFiles(func);
191
192 if (items === undefined) {
193 return results;
194 } else {
195 const itemSet = new Set(items.map(Cache.hash));
196 return results.filter(r => itemSet.has(r));
197 }
198 }
199
200 static delete(func: Function | string, keyData: any): void {
201 _createCacheDirectoryIfNotExists(func);

Callers 4

getItemsMethod · 0.80
deleteItemsMethod · 0.80
filterItemsInCacheMethod · 0.80
filterItemsNotInCacheMethod · 0.80

Calls 3

getCachedFilesFunction · 0.85
filterMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected