Initialisation

Added the packages and files for the backend server
This commit is contained in:
jackbeeby
2024-12-15 17:48:45 +11:00
parent 25066e1ee8
commit b412dfe2ca
2732 changed files with 330572 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.valueMatchesCriteria = void 0;
function valueMatchesCriteria(value, criteria) {
if (value == null) {
return value === criteria;
}
else if (Array.isArray(value)) {
return Array.isArray(criteria) && value.every((val, index) => valueMatchesCriteria(val, criteria[index]));
}
else if (typeof value === 'object') {
return (typeof criteria === 'object' &&
criteria &&
Object.keys(criteria).every(propertyName => valueMatchesCriteria(value[propertyName], criteria[propertyName])));
}
else if (criteria instanceof RegExp) {
return criteria.test(value);
}
return value === criteria;
}
exports.valueMatchesCriteria = valueMatchesCriteria;