1/**
2 * The `Symbol` module contains the runtime predicate for JavaScript primitive
3 * `symbol` values. It is most useful at boundaries where a value is `unknown`
4 * and must be narrowed before it can be used as a symbol key, identifier, or
5 * discriminant.
6 *
7 * @since 2.0.0
8 */
9
10import * as predicate from "./Predicate.ts"
11
12/**
13 * Checks whether a value is a `symbol`.
14 *
15 * **When to use**
16 *
17 * Use to validate unknown input before treating it as a JavaScript `symbol`.
18 *
19 * **Example** (Checking for symbols)
20 *
21 * ```ts import.meta.vitest
22 * import { Symbol } from "effect"
23 *
24 * Symbol.isSymbol(globalThis.Symbol.for("a")) // => true
25 * Symbol.isSymbol("a") // => false
26 * ```
27 *
28 * @category guards
29 * @since 2.0.0
30 */
31export const isSymbol: (u: unknown) => u is symbol = predicate.isSymbol