Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import { globalThis_ } from "./globalThis.mjs";
//#region src/_internal/DOMException.d.ts
declare const DOMException: typeof globalThis_.DOMException;
//#endregion
export { DOMException };

View File

@@ -0,0 +1,6 @@
import { globalThis_ } from "./globalThis.js";
//#region src/_internal/DOMException.d.ts
declare const DOMException: typeof globalThis_.DOMException;
//#endregion
export { DOMException };

View File

@@ -0,0 +1,5 @@
const require_globalThis = require("./globalThis.js");
//#region src/_internal/DOMException.ts
const DOMException = typeof require_globalThis.globalThis_.DOMException !== "undefined" ? require_globalThis.globalThis_.DOMException : Error;
//#endregion
exports.DOMException = DOMException;

View File

@@ -0,0 +1,5 @@
import { globalThis_ } from "./globalThis.mjs";
//#region src/_internal/DOMException.ts
const DOMException = typeof globalThis_.DOMException !== "undefined" ? globalThis_.DOMException : Error;
//#endregion
export { DOMException };

View File

@@ -0,0 +1,8 @@
//#region src/_internal/compareValues.ts
function compareValues(a, b, order) {
if (a < b) return order === "asc" ? -1 : 1;
if (a > b) return order === "asc" ? 1 : -1;
return 0;
}
//#endregion
exports.compareValues = compareValues;

View File

@@ -0,0 +1,8 @@
//#region src/_internal/compareValues.ts
function compareValues(a, b, order) {
if (a < b) return order === "asc" ? -1 : 1;
if (a > b) return order === "asc" ? 1 : -1;
return 0;
}
//#endregion
export { compareValues };

View File

@@ -0,0 +1,4 @@
//#region src/_internal/globalThis.d.ts
declare const globalThis_: typeof globalThis;
//#endregion
export { globalThis_ };

View File

@@ -0,0 +1,4 @@
//#region src/_internal/globalThis.d.ts
declare const globalThis_: typeof globalThis;
//#endregion
export { globalThis_ };

6
node_modules/es-toolkit/dist/_internal/globalThis.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
//#region src/_internal/globalThis.ts
const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
return this;
})() || Function("return this")();
//#endregion
exports.globalThis_ = globalThis_;

View File

@@ -0,0 +1,6 @@
//#region src/_internal/globalThis.ts
const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
return this;
})() || Function("return this")();
//#endregion
export { globalThis_ };

View File

@@ -0,0 +1,17 @@
//#region src/_internal/isEqualsSameValueZero.d.ts
/**
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
*
* @param {any} value - The value to compare.
* @param {any} other - The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*
* @example
* eq(1, 1); // true
* eq(0, -0); // true
* eq(NaN, NaN); // true
* eq('a', Object('a')); // false
*/
declare function isEqualsSameValueZero(value: any, other: any): boolean;
//#endregion
export { isEqualsSameValueZero };

View File

@@ -0,0 +1,17 @@
//#region src/_internal/isEqualsSameValueZero.d.ts
/**
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
*
* @param {any} value - The value to compare.
* @param {any} other - The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*
* @example
* eq(1, 1); // true
* eq(0, -0); // true
* eq(NaN, NaN); // true
* eq('a', Object('a')); // false
*/
declare function isEqualsSameValueZero(value: any, other: any): boolean;
//#endregion
export { isEqualsSameValueZero };

View File

@@ -0,0 +1,19 @@
//#region src/_internal/isEqualsSameValueZero.ts
/**
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
*
* @param {any} value - The value to compare.
* @param {any} other - The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*
* @example
* eq(1, 1); // true
* eq(0, -0); // true
* eq(NaN, NaN); // true
* eq('a', Object('a')); // false
*/
function isEqualsSameValueZero(value, other) {
return value === other || Number.isNaN(value) && Number.isNaN(other);
}
//#endregion
exports.isEqualsSameValueZero = isEqualsSameValueZero;

View File

@@ -0,0 +1,19 @@
//#region src/_internal/isEqualsSameValueZero.ts
/**
* Performs a `SameValueZero` comparison between two values to determine if they are equivalent.
*
* @param {any} value - The value to compare.
* @param {any} other - The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*
* @example
* eq(1, 1); // true
* eq(0, -0); // true
* eq(NaN, NaN); // true
* eq('a', Object('a')); // false
*/
function isEqualsSameValueZero(value, other) {
return value === other || Number.isNaN(value) && Number.isNaN(other);
}
//#endregion
export { isEqualsSameValueZero };

View File

@@ -0,0 +1,16 @@
//#region src/_internal/isUnsafeProperty.ts
/**
* Checks if a property key is unsafe to modify directly.
*
* This function is used in functions like `merge` to prevent prototype pollution attacks
* by identifying property keys that could modify the object's prototype chain or constructor.
*
* @param key - The property key to check
* @returns `true` if the property is unsafe to modify directly, `false` otherwise
* @internal
*/
function isUnsafeProperty(key) {
return key === "__proto__";
}
//#endregion
exports.isUnsafeProperty = isUnsafeProperty;

View File

@@ -0,0 +1,16 @@
//#region src/_internal/isUnsafeProperty.ts
/**
* Checks if a property key is unsafe to modify directly.
*
* This function is used in functions like `merge` to prevent prototype pollution attacks
* by identifying property keys that could modify the object's prototype chain or constructor.
*
* @param key - The property key to check
* @returns `true` if the property is unsafe to modify directly, `false` otherwise
* @internal
*/
function isUnsafeProperty(key) {
return key === "__proto__";
}
//#endregion
export { isUnsafeProperty };