UNPKG

319 BJavaScriptView Raw
1const path = require('path')
2const crypto = require('crypto');
3const findCacheDir = require('find-cache-dir');
4
5const cacheDir = findCacheDir({name: 'carmi'});
6
7module.exports = options => {
8 const hash = crypto.createHash('md5').update(JSON.stringify(options)).digest('hex');
9 return path.resolve(cacheDir, hash);
10}