(callback)
| 378 | try { |
| 379 | const value = await db.get(type + '_' + id, {valueEncoding: 'json'}); |
| 380 | cur.cache[type][id] = value; |
| 381 | return value; |
| 382 | } catch (err) { |
| 383 | cur.cache[type][id] = null; |
| 384 | return null; |
| 385 | } |
| 386 | } |
| 387 | |
| 388 | function checksum (path, callback, algorithm) { |
| 389 | const stream = fs.createReadStream(path); |
| 390 | const checksum = crypto.createHash(algorithm); |
| 391 | stream.on('error', function (err) { |
no test coverage detected