mirror of
https://github.com/github/codeql.git
synced 2026-01-22 02:44:45 +01:00
22 lines
320 B
JavaScript
22 lines
320 B
JavaScript
(function(global) {
|
|
var cache;
|
|
|
|
global.init = function init() {
|
|
cache = {};
|
|
};
|
|
|
|
global.done = function done() {
|
|
};
|
|
|
|
global.get = function get(k) {
|
|
k = '$' + k;
|
|
if (!cache.hasOwnProperty(k))
|
|
cache[k] = compute(k);
|
|
return cache[k];
|
|
}
|
|
|
|
function compute(k) {
|
|
// compute value for k
|
|
// ...
|
|
}
|
|
}(this)); |