1
0
Fork 0

Added Statistics calculation

Statistics now show calculated values
This commit is contained in:
Techognito 2025-09-04 17:30:00 +02:00
parent fe87374e47
commit fc0f69dacb
2147 changed files with 141321 additions and 39 deletions

View file

@ -0,0 +1,12 @@
/**
* A fast array comparison function that compares two arrays for equality.
*
* Assumes that the arrays are ordered and contain only primitive values.
*
* It is faster than `fastObjectShallowCompare` for arrays.
*
* Returns true for instance equality, even if inputs are not arrays.
*
* @returns true if arrays contain the same elements in the same order, false otherwise.
*/
export declare function fastArrayCompare<T>(a: T, b: T): boolean;

View file

@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.fastArrayCompare = fastArrayCompare;
/**
* A fast array comparison function that compares two arrays for equality.
*
* Assumes that the arrays are ordered and contain only primitive values.
*
* It is faster than `fastObjectShallowCompare` for arrays.
*
* Returns true for instance equality, even if inputs are not arrays.
*
* @returns true if arrays contain the same elements in the same order, false otherwise.
*/
function fastArrayCompare(a, b) {
if (a === b) {
return true;
}
if (!Array.isArray(a) || !Array.isArray(b)) {
return false;
}
let i = a.length;
if (i !== b.length) {
return false;
}
// eslint-disable-next-line no-plusplus
while (i--) {
if (a[i] !== b[i]) {
return false;
}
}
return true;
}

View file

@ -0,0 +1 @@
export { fastArrayCompare } from "./fastArrayCompare.js";

View file

@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "fastArrayCompare", {
enumerable: true,
get: function () {
return _fastArrayCompare.fastArrayCompare;
}
});
var _fastArrayCompare = require("./fastArrayCompare");