mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-11 14:41:11 +00:00
.
This commit is contained in:
parent
00c3b50fca
commit
ae5dcb46c8
7331 changed files with 1784502 additions and 0 deletions
node_modules/cosmiconfig/dist
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;
|
Loading…
Add table
Add a link
Reference in a new issue