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

26
node_modules/es-toolkit/dist/predicate/isWeakSet.mjs generated vendored Normal file
View File

@@ -0,0 +1,26 @@
//#region src/predicate/isWeakSet.ts
/**
* Checks if the given value is a `WeakSet`.
*
* This function tests whether the provided value is an instance of `WeakSet`.
* It returns `true` if the value is a `WeakSet`, and `false` otherwise.
*
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `WeakSet`.
*
* @param {unknown} value - The value to test if it is a `WeakSet`.
* @returns {value is WeakSet<WeakKey>} true if the value is a `WeakSet`, false otherwise.
*
* @example
* const value1 = new WeakSet();
* const value2 = new Map();
* const value3 = new Set();
*
* console.log(isWeakSet(value1)); // true
* console.log(isWeakSet(value2)); // false
* console.log(isWeakSet(value3)); // false
*/
function isWeakSet(value) {
return value instanceof WeakSet;
}
//#endregion
export { isWeakSet };