1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 12:50:04 +02:00
This commit is contained in:
s2
2018-05-18 17:26:33 +02:00
parent 0ea0853165
commit 2c5b23c10e
1125 changed files with 118732 additions and 1 deletions

28
app/node_modules/binary/lib/vars.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
module.exports = function (store) {
function getset (name, value) {
var node = vars.store;
var keys = name.split('.');
keys.slice(0,-1).forEach(function (k) {
if (node[k] === undefined) node[k] = {};
node = node[k]
});
var key = keys[keys.length - 1];
if (arguments.length == 1) {
return node[key];
}
else {
return node[key] = value;
}
}
var vars = {
get : function (name) {
return getset(name);
},
set : function (name, value) {
return getset(name, value);
},
store : store || {},
};
return vars;
};