initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

108
node_modules/pegjs/lib/utils/arrays.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
"use strict";
/* Array utilities. */
var arrays = {
range: function(start, stop) {
var length = stop - start,
result = new Array(length),
i, j;
for (i = 0, j = start; i < length; i++, j++) {
result[i] = j;
}
return result;
},
find: function(array, valueOrPredicate) {
var length = array.length, i;
if (typeof valueOrPredicate === "function") {
for (i = 0; i < length; i++) {
if (valueOrPredicate(array[i])) {
return array[i];
}
}
} else {
for (i = 0; i < length; i++) {
if (array[i] === valueOrPredicate) {
return array[i];
}
}
}
},
indexOf: function(array, valueOrPredicate) {
var length = array.length, i;
if (typeof valueOrPredicate === "function") {
for (i = 0; i < length; i++) {
if (valueOrPredicate(array[i])) {
return i;
}
}
} else {
for (i = 0; i < length; i++) {
if (array[i] === valueOrPredicate) {
return i;
}
}
}
return -1;
},
contains: function(array, valueOrPredicate) {
return arrays.indexOf(array, valueOrPredicate) !== -1;
},
each: function(array, iterator) {
var length = array.length, i;
for (i = 0; i < length; i++) {
iterator(array[i], i);
}
},
map: function(array, iterator) {
var length = array.length,
result = new Array(length),
i;
for (i = 0; i < length; i++) {
result[i] = iterator(array[i], i);
}
return result;
},
pluck: function(array, key) {
return arrays.map(array, function (e) { return e[key]; });
},
every: function(array, predicate) {
var length = array.length, i;
for (i = 0; i < length; i++) {
if (!predicate(array[i])) {
return false;
}
}
return true;
},
some: function(array, predicate) {
var length = array.length, i;
for (i = 0; i < length; i++) {
if (predicate(array[i])) {
return true;
}
}
return false;
}
};
module.exports = arrays;

12
node_modules/pegjs/lib/utils/classes.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
/* Class utilities */
var classes = {
subclass: function(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor();
}
};
module.exports = classes;

54
node_modules/pegjs/lib/utils/objects.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
"use strict";
/* Object utilities. */
var objects = {
keys: function(object) {
var result = [], key;
for (key in object) {
if (object.hasOwnProperty(key)) {
result.push(key);
}
}
return result;
},
values: function(object) {
var result = [], key;
for (key in object) {
if (object.hasOwnProperty(key)) {
result.push(object[key]);
}
}
return result;
},
clone: function(object) {
var result = {}, key;
for (key in object) {
if (object.hasOwnProperty(key)) {
result[key] = object[key];
}
}
return result;
},
defaults: function(object, defaults) {
var key;
for (key in defaults) {
if (defaults.hasOwnProperty(key)) {
if (!(key in object)) {
object[key] = defaults[key];
}
}
}
}
};
module.exports = objects;