reports/frontend/node_modules/es-toolkit/dist/predicate/isSet.js
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

23 lines
617 B
JavaScript

//#region src/predicate/isSet.ts
/**
* Checks if a given value is `Set`.
*
* This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Set`.
*
* @param value The value to check if it is a `Set`.
* @returns Returns `true` if `value` is a `Set`, else `false`.
*
* @example
* const value1 = new Set();
* const value2 = new Map();
* const value3 = new WeakSet();
*
* console.log(isSet(value1)); // true
* console.log(isSet(value2)); // false
* console.log(isSet(value3)); // false
*/
function isSet(value) {
return value instanceof Set;
}
//#endregion
exports.isSet = isSet;