mirror of
https://github.com/actions/setup-python.git
synced 2025-06-14 08:17:12 +02:00
Initial pass
This commit is contained in:
19
node_modules/cosmiconfig/dist/cacheWrapper.js
generated
vendored
Normal file
19
node_modules/cosmiconfig/dist/cacheWrapper.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
'use strict';
|
||||
|
||||
function cacheWrapper (cache , key , fn ) {
|
||||
if (!cache) {
|
||||
return fn();
|
||||
}
|
||||
|
||||
const cached = cache.get(key);
|
||||
if (cached !== undefined) {
|
||||
return cached;
|
||||
}
|
||||
|
||||
const result = fn();
|
||||
cache.set(key, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = cacheWrapper;
|
Reference in New Issue
Block a user