| /** | |
| * The `Symbol` module contains the runtime predicate for JavaScript primitive | |
| * `symbol` values. It is most useful at boundaries where a value is `unknown` | |
| * and must be narrowed before it can be used as a symbol key, identifier, or | |
| * discriminant. | |
| * | |
| * @since 2.0.0 | |
| */ | |
| import * as predicate from "./Predicate.ts" | |
| /** | |
| * Checks whether a value is a `symbol`. | |
| * | |
| * **When to use** | |
| * | |
| * Use to validate unknown input before treating it as a JavaScript `symbol`. | |
| * | |
| * **Example** (Checking for symbols) | |
| * | |
| * ```ts | |
| * import { Symbol } from "effect" | |
| * | |
| * console.log(Symbol.isSymbol(globalThis.Symbol.for("a"))) // true | |
| * console.log(Symbol.isSymbol("a")) // false | |
| * ``` | |
| * | |
| * @category guards | |
| * @since 2.0.0 | |
| */ | |
| export const isSymbol: (u: unknown) => u is symbol = predicate.isSymbol | |
Xet Storage Details
- Size:
- 801 Bytes
- Xet hash:
- 54f06817b42242babe189548548fb0f5d794a657826025b44d5e05c4c5b3966b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.