MCPcopy
hub / github.com/omkarcloud/botasaurus / getItems

Method getItems

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

Source from the content-addressed store, hash-verified

176 }
177
178 static getItems(func: Function | string, items?: any[]): any[] {
179 if (typeof items === 'string') {
180 return Cache.getItems(func, [items]);
181 }
182
183 const hashes = Cache.getItemsHashes(func, items);
184 const fnName = getFnName(func);
185 const paths = hashes.map(r => path.join(Cache.cacheDirectory, fnName, `${r}.json`));
186 return _readJsonFiles(paths);
187 }
188
189 static getItemsHashes(func: Function | string, items?: any[]): string[] {
190 const results = getCachedFiles(func);

Callers 1

getMethod · 0.80

Calls 4

getFnNameFunction · 0.85
_readJsonFilesFunction · 0.85
getItemsHashesMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected