(func: Function | string, items?: any[])
| 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); |
no test coverage detected