neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
@@ -0,0 +1,6 @@
/**
* Fast shallow compare for plain objects.
* Returns `true` when both objects have the same own enumerable keys and each value is equal
* according to `Object.is()`.
*/
export default function fastObjectShallowCompare<T extends Record<string, any> | null>(a: T, b: T): boolean;
@@ -0,0 +1,6 @@
/**
* Fast shallow compare for plain objects.
* Returns `true` when both objects have the same own enumerable keys and each value is equal
* according to `Object.is()`.
*/
export default function fastObjectShallowCompare<T extends Record<string, any> | null>(a: T, b: T): boolean;
@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = fastObjectShallowCompare;
// From mui-x: https://github.com/mui/mui-x/blob/bb92fb0adac6764461adea9a9d7d43f1095f49e5/packages/x-internals/src/fastObjectShallowCompare/fastObjectShallowCompare.ts
/* eslint-disable guard-for-in */
const is = Object.is;
/**
* Fast shallow compare for plain objects.
* Returns `true` when both objects have the same own enumerable keys and each value is equal
* according to `Object.is()`.
*/
function fastObjectShallowCompare(a, b) {
if (a === b) {
return true;
}
if (!(a instanceof Object) || !(b instanceof Object)) {
return false;
}
let aLength = 0;
let bLength = 0;
for (const key in a) {
aLength += 1;
if (!is(a[key], b[key])) {
return false;
}
if (!(key in b)) {
return false;
}
}
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars
for (const _ in b) {
bLength += 1;
}
return aLength === bLength;
}
@@ -0,0 +1,35 @@
// From mui-x: https://github.com/mui/mui-x/blob/bb92fb0adac6764461adea9a9d7d43f1095f49e5/packages/x-internals/src/fastObjectShallowCompare/fastObjectShallowCompare.ts
/* eslint-disable guard-for-in */
const is = Object.is;
/**
* Fast shallow compare for plain objects.
* Returns `true` when both objects have the same own enumerable keys and each value is equal
* according to `Object.is()`.
*/
export default function fastObjectShallowCompare(a, b) {
if (a === b) {
return true;
}
if (!(a instanceof Object) || !(b instanceof Object)) {
return false;
}
let aLength = 0;
let bLength = 0;
for (const key in a) {
aLength += 1;
if (!is(a[key], b[key])) {
return false;
}
if (!(key in b)) {
return false;
}
}
// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars
for (const _ in b) {
bLength += 1;
}
return aLength === bLength;
}
+1
View File
@@ -0,0 +1 @@
export { default } from "./fastObjectShallowCompare.mjs";
+1
View File
@@ -0,0 +1 @@
export { default } from "./fastObjectShallowCompare.js";
+13
View File
@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function () {
return _fastObjectShallowCompare.default;
}
});
var _fastObjectShallowCompare = _interopRequireDefault(require("./fastObjectShallowCompare"));
+1
View File
@@ -0,0 +1 @@
export { default } from "./fastObjectShallowCompare.mjs";